where \(l\)  is the characteristic scale of the variations of the gravitational field and \(L\)  is the size of the “box”, the boundary effects are negligible and so the condensation is the only possible mean to remove the infrared divergencies. Keeping in mind that the free energy obtained above is the finite-temperature part of the effective action, the appearance of the infrared divergencies at \(m^2\rightarrow 0\)  for a slowly varying gravitational field is quite expectable (see, e.g., [1]}, [2]}, [3]}, [4]}, [5]}, [6]}). For the rapidly changing metric field such divergencies may not appear [7]}, but this fact has nothing in common with the infrared divergencies arising in the infrared limit.
