Application of large deviation theory to the mean-field $\boldsymbol{\varphi}^\mathsf{4}$-model