We study the internal dynamics of an elementary quantum system placed close to a body held at a temperature different from that of the surrounding radiation. We derive general expressions for lifetime and density matrix valid for bodies of arbitrary geometry and dielectric permittivity. Out of equilibrium, the thermalization process and steady states become both qualitatively and quantitatively significantly different from the case of radiation at thermal equilibrium. For the case of a three-level atom close to a slab of finite thickness, we predict the occurrence of population inversion and an efficient cooling mechanism for the quantum system, whose effective internal temperature can be driven to values much lower than both involved temperatures. Our results show that non-equilibrium configurations provide new promising ways to control the state of an atomic system.