It is known that the equation
$$ \Delta f = 0 $$
on some bounded domain $\Omega$ on $\mathbb{R}^n$ subjected to certain boundary conditions can be derived through the minimization of the Dirichlet Energy
$$ E(f) = \frac{1}{2}\int_\Omega \left\lVert \nabla f \right\rVert^2 dx $$
It happens however that again under certain conditions the operator $\Delta$ is selfadjoint, with the all the nice spectral properties coming from it.
I wonder now if there's a general formulation to find self adjoint operators as minimization of certain functionals which have certain properties. I would assume maybe convex and quadratic functionals might have such properties, but I don't know more in general.
Can anyone provide a reference?