Application of large deviation theory to the mean-field φ4-model