Generalized Mathematical Homogenization of Atomistic Media at Finite Temperatures