Singular perturbations of finite dimensional gradient flows