Let $H$ be a Hilbert space with orthonormal basis $\{h_n:n\in \Bbb N\}$. Let $P_n$ be the orthogonal projection to $\operatorname{span}\{h_1,\cdots, h_n\}$.
Claim: A bounded subset $U\subset H$ is relatively compact if and only if $$\lim_{n\to \infty}\sup_{x\in U} \|x-P_nx\|=0$$
Attempt:
"$\implies$": Let $\epsilon>0$. By assumption, the open cover $\overline{U}\subset\bigcup_{x\in U} B_\epsilon(x)$ has a finite subcover $\overline{U}\subset\bigcup_{i=1}^n B_\epsilon(c_i)$. Then we can choose a certain $N_i\in \Bbb N$ such that $$\|c_i-P_nc_i\|<\epsilon$$ holds for $n\geq N_i$. Now I want to put $N=\max\{N_i:i=1,\cdots, n\}$. Then one has for all $x\in B_\epsilon(c_i)$ and $n\geq N$ $$\|c_i-P_nx\|\leq \|c_i-P_nc_i\|+\|P_nc_i-P_nx\|<2\epsilon$$
Now let $x\in U$ be arbitrary with, say, $x\in B_\epsilon(c_i)$. Then we have $$\|x-P_nx\|\leq \|x-c_i\|+\|c_i-P_nx\|<3\epsilon$$ whenever $n\geq N$. That proves what we've been trying to show.
"$\impliedby$": I let $x=(x_k)_{k\in \Bbb N}\subset U$ be any sequence and I want to find a Cauchy subsequence. For $\epsilon>0$ there exists some $n_\epsilon\in \Bbb N$ with $$\sup_{x\in U}\|x-P_{n_\epsilon}x\|<\epsilon$$
Since $\operatorname{image }P_{n_\epsilon}\subset \Bbb C^{n_\epsilon}$, we can find a Cauchy subsequence of $\left( P_{n\epsilon}x_k \right)_{k\in \Bbb N}$, say $\left( P_{n\epsilon}x_{k_i} \right)_{i\in \Bbb N}$. Then $(x_{k_i})_{i\in \Bbb N}$ satisfies $$\|x_{k_i}-x_{k_j}\|\leq\|x_{k_i}-P_{n\epsilon}x_{k_i}\|+\|P_{n\epsilon}x_{k_i}-P_{n\epsilon}x_{k_j}\|+\|P_{n\epsilon}x_{k_j}-x_{k_j}\|<3\epsilon$$ for sufficiently large $i,j$.
This does not imply that $(x_{k_i})_{i\in \Bbb N}$ is the Cauchy subsequence we were looking for, because we fixed the $\epsilon>0$ before choosing the subsequence. But it looks somewhat promising regardless. Can we remedy the situation using some "diagonalization-esque" argument?
Don't feel obliged address my attempt, I may have overcomplicated things.