Let $T:H\rightarrow H$ be compact, self-adjoint on $H$ separable. Then there is an orthonormal basis for $H$ made up of eigenfunction of $T$.
The proof is based on this two fact: \begin{equation} T\neq 0 \Rightarrow ||T||_{OP} \quad \mbox{or} \quad -||T||_{OP} \quad \mbox{is an eigenvalue} \end{equation} and \begin{equation} TS\subset S \quad and \quad TS^{\perp}\subset S^{\perp} \end{equation} I have no idea to prove the first one.
\begin{equation} \left( ||T||_{OP}=\sup_{u\in H, u\neq 0}\frac{||Tu||_H}{||u||_H}=\sup_{u\in H, ||u||_H=0}||Tu||_H \right) \end{equation}
Let us denote the inner product on $H$ by $( \cdot, \cdot)$ and we write $||T||$ instead of $||T||_{OP}$.
Furthermore we use that $||T||= \sup_{||u||_H=1}|(Tu,u)|$
($T$ is self-adjoint !). We cann assume that $T \ne 0$.
Then there is a sequence $(u_n)$ in H and a real number $ \mu$ such that
$||u_n||=1, |\mu|=||T||$ and $(Tu_n,u_n) \to \mu$.
Then
$ 0 \le ||Tu_n-\mu u_n||^2=||Tu_n||^2-2 \mu (Tu_n,u_n)+\mu^2||u_n||^2 \le ||T||^2-2 \mu (Tu_n,u_n)+||T||^2$.
It follows that $(*)$ $Tu_n - \mu u_n \to 0$.
Since $T$ is compact, the sequence $(Tu_n)$ contains a convergent subsequence. Without loss of generality we can assume that $(Tu_n)$ is convergent. From $(*)$ we see that $(u_n)$ converges. Let $u$ the limit of this sequence, then $||u||_H=1$ and $Tu= \mu u$. Hence $ \mu$ is an eigenvalue of $T$ and $ \mu= \pm ||T||$.