Let $H$ be a Hilbert separable space. with the orthonormal bais $(e_n)_{n\in \mathbb{N}}$, and $(\lambda_n)_{n\in \mathbb{N}}$ a bounded sequence in $ \mathbb{C}$.
We define the operator $T : H \rightarrow H$, as $T(e_n)=\lambda_n e_n$
We need to prove that $T$ is compact if and only if $\lim_n\lambda_n=0.$
I only did the reverse :
Suppose that $(\lambda_n)_n $ converge to $0$.
We define the finite rank operators $T_k$ defined as : $T_k(x)=(\lambda_1x_1,..,\lambda_kx_k,0,0,...)$.
And now we prove that $||T_k-T||\rightarrow 0.$
We have : $T(x)-T_k(x)=(0,0,...,\lambda_{k+1}x_{k+1},...)$
then : $||T_k-T||\leq sup_{n>k+1}|\lambda_n|\rightarrow0.$
then $T$ is compact as limit of finite rank operators.
[But I'm always stuck with the direct implication]
By the equivalent characterization of compact operators on a Hilbert space as taking the unit ball to a compact set, we just need to find a sequence in the image with no convergent subsequence. Because the $\lambda_i$ do not converge to $0$, pick a subsequence $\lambda_{n_i}$ with $|\lambda_{n_i}|>\delta$. Then the vectors $\lambda_{n_i}e_{n_i}$ are in the image of the unit ball, but they are all orthogonal, so the distance between each of them is at least $\sqrt{2}\delta$.