A disorder-dependent Gaussian variational approach is applied to the d
-dimensional ferromagnetic XY model in a random field. The randomness
yields a nonextensive contribution to the variational free energy, imp
lying a random mass term in correlation functions. The Imry-Ma low-tem
perature result, concerning the existence (d>4) or absence (d<4) of lo
ng-range order is obtained in a transparent way. The physical picture
which emerges below d=4 is that of a marginally stable mixture of doma
ins. We also calculate within this variational scheme, disorder-depend
ent correlation functions, as well as the probability distribution of
the Imry-Ma domain size.