Mod-Gaussian convergence and its applications for models of statistical mechanics