[guided]The purpose of the eigenfunction expansion is to separate the quadratic form into independent one-dimensional contributions. Let
\begin{align*}
\phi: \Sigma &\to \mathbb{R}
\end{align*}
be a smooth variation function, and define its coefficient in the $j$-th eigendirection by
\begin{align*}
a_j := \int_\Sigma \phi\,\varphi_j\,d\mathcal{H}^m .
\end{align*}
Because the eigenfunctions form an orthonormal basis of $L^2(\Sigma,\mathcal{H}^m)$, we have
\begin{align*}
\phi = \sum_{j=1}^\infty a_j\varphi_j
\end{align*}
in $L^2(\Sigma,\mathcal{H}^m)$.
Now apply the Jacobi operator only to finite spectral truncations, where no interchange of an infinite sum with an integral is involved. For each $N \in \mathbb{N}$, define
\begin{align*}
\phi_N := \sum_{j=1}^N a_j\varphi_j .
\end{align*}
Since the sum defining $\phi_N$ is finite and each eigenfunction satisfies $L\varphi_j=\lambda_j\varphi_j$, we have
\begin{align*}
L\phi_N = \sum_{j=1}^N a_j\lambda_j\varphi_j .
\end{align*}
Bilinearity of the $L^2(\Sigma)$ inner product and orthonormality of the eigenfunctions give
\begin{align*}
\int_\Sigma \phi_N\,L\phi_N\,d\mathcal{H}^m = \sum_{j=1}^N \lambda_j a_j^2 .
\end{align*}
The passage from $\phi_N$ to $\phi$ is justified by the quadratic-form part of the spectral theorem for the self-adjoint elliptic operator $L$: because $\phi$ is smooth, $\phi$ lies in the form domain of $L$, and the finite spectral truncations converge to $\phi$ in that form norm. Hence
\begin{align*}
\int_\Sigma \phi\,L\phi\,d\mathcal{H}^m = \lim_{N\to\infty}\sum_{j=1}^N \lambda_j a_j^2 .
\end{align*}
The cross terms vanish because
\begin{align*}
\int_\Sigma \varphi_i\varphi_j\,d\mathcal{H}^m = 0
\end{align*}
when $i \neq j$, while the diagonal terms satisfy
\begin{align*}
\int_\Sigma \varphi_j^2\,d\mathcal{H}^m = 1 .
\end{align*}
Using the sign convention in the theorem statement,
\begin{align*}
Q[\phi] = -\int_\Sigma \phi\,L\phi\,d\mathcal{H}^m = -\lim_{N\to\infty}\sum_{j=1}^N \lambda_j a_j^2 .
\end{align*}
This formula is the whole mechanism: positive eigenvalues make negative contributions to $Q$, zero eigenvalues make no contribution, and negative eigenvalues make positive contributions.[/guided]