Let $x\in X$. We have $P_n(x)=\sum_{j=1}^n\langle x,e_j\rangle e_j$ so , by Bessel-Parseval equality
$$\lVert P_nx-x\rVert^2=\sum_{j\geq n+1}|\langle x,e_j\rangle|^2.$$
As the latest series is convergent we have the result.
Now, let $K\subset H$ compact. Fix $\varepsilon >0$. Then we can find an integer $N$ and $x_1,\dots,x_N\in K$ such that for each $x\in K$, we can find $1\leq k \leq N$ such that $\lVert x-x_k\rVert\leq\varepsilon$. Fix $x\in K$. Then $$\lVert P_nx-x\rVert^2=\sum_{j\geq n+1}|\langle x-x_k+x_k,e_j\rangle|^2\leq \varepsilon^2+\max_{1\leq k\leq N}\sum_{j\geq n+1}|\langle x_k,e_j\rangle|^2.$$
As the RHS doesn't depend on $x$, we have
$$\sup_{x\in K}\lVert P_nx-x\rVert^2\leq \varepsilon^2+\max_{1\leq k\leq N}\sum_{j\geq n+1}|\langle x_k,e_j\rangle|^2.$$
Now take the $\limsup_{n\to+\infty}$ to get the result.
- If $T$ is compact, then $K:=\overline{T(B(0,1))}$ is compact, so we apply the previous result to this $K$.
Note that the property of approximation of a compact operator by a finite rank operator is true in any Hilbert space, not only in separable ones. To see that, fix $\varepsilon>0$; then take $v_1,\dots,v_N$ such that $T(B(0,1))\subset \bigcup_{j=1}^NB(y_j,\varepsilon)$. Let $P$ the projection over the vector space generated by $\{y_1,\dots,y_N\}$ (it's a closed subspace). Consider $PT$: it's a finite ranked operator. Now take $x\in B(0,1)$. Then
pick $j$ such that $\lVert Tx-y_j\rVert\leq\varepsilon$. We also have, as $\lVert P\rVert\leq 1$, that $\lVert PTx-Py_j\rVert\leq \varepsilon$. As $Py_j=y_j$, we get $\lVert PTx-Tx\rVert\leq 2\varepsilon$.
A linear projection $P$ onto a subspace $\mathcal{M}$ has the properties that (a) the range of $P$ is $\mathcal{M}$, (b) projecting twice is the same as projecting once: $P^{2}=P$.
Orthogonal projection is something peculiar to an inner product space, and it is the same as closest point projection for a subspace. There can be many projections onto a subspace, but only one orthogonal projection. You would have seen the first examples of this in Calculus where you were asked to find the closest-point projection of a point $p$ onto a line or plane by finding a point $q$ on the line or plane such that $p-q$ is orthogonal to the given line or plane.
The orthogonal projection of a point $p$ onto a closed subspace $\mathcal{M}$ of a Hilbert space is the unique point $m\in \mathcal{M}$ such that $(p-m) \perp\mathcal{M}$. That is $(x-P_{\mathcal{M}}x) \perp \mathcal{M}$ uniquely determines $P_{\mathcal{M}}$, and this function is automatically linear. Orthogonal projection onto a subspace $\mathcal{M}$ is a closest point projection; that is,
$$
\|x-m\| \ge \|x-P_{\mathcal{M}}x\|,\;\;\; m \in M,
$$
with equality iff $m=P_{\mathcal{M}}x$.
For your case, the orthogonal projection $Px$ of $x$ onto the subspace spanned by $\{ e_{n}\}_{n=1}^{N}$ is the unique $y=\sum_{n}\alpha_{n}e_{n}$ such that $(x-\sum_{n}\alpha_{n}e_{n})\perp \mathcal{M}$. Equivalently,
$$
(x-\sum_{n}\alpha_{n}e_{n}, e_{m})=0,\;\;\; m=1,2,3,\cdots,N,
$$
or, using the orthonormality of $\{ e_{n} \}$,
$$
(x,e_{m}) = \sum_{n}\alpha_{n}(e_{n},e_{m})=\alpha_{m}.
$$
So the orthogonal projection $P$ onto the subspace $\mathcal{M}$ spanned by $\{ e_{n}\}_{n=1}^{N}$ is
$$
Px = \sum_{n=1}^{N}(x,e_{n})e_{n}.
$$
By design, one has $(x-Px)\perp\mathcal{M}$. In particular, $(x-Px)\perp Px$ because $Px\in\mathcal{M}$, which gives the orthogonal decomposition $x=Px+(I-P)x$, and
$$
\|x\|^{2}=\|Px\|^{2}+\|(I-P)x\|^{2}.
$$
So, both $P$ and $I-P$ are continuous. But $\mathcal{N}(I-P)=\mathcal{M}$ because $Px=x$ iff $x\in\mathcal{M}$, which guarantees that $\mathcal{M}=(I-P)^{-1}\{0\}$ is closed.
Best Answer
Say the family of orthonormal vectors is indexed by some set $I$. For any finite $F \subseteq I$ we have $$0 \leq \bigg\lVert f - \sum_{i \in F} \langle f, e_i \rangle e_i \bigg\rVert^2 = \lVert f \rVert^2 - 2\sum_{i \in F} |\langle f, e_i \rangle|^2 + \sum_{i \in F} |\langle f, e_i \rangle|^2 = \lVert f \rVert^2 - \sum_{i \in F} |\langle f, e_i \rangle|^2.$$ So, $\sum_{i \in F} |\langle f, e_i \rangle|^2 \leq \lVert f \rVert^2$ for all finite $F \subseteq I$. Thus $\sum_{i \in I} |\langle f, e_i \rangle|^2 \leq \lVert f \rVert^2 < \infty$. In particular, the set $$\{i \in I : \langle f, e_i \rangle \neq 0\} = \bigcup_{n=1}^\infty \{i \in I : |\langle f, e_i \rangle| > 1/n\}$$ is countable since for each $n$ the set $\{i \in I : |\langle f, e_i \rangle | > 1/n\}$ is finite. Let $(e_j)_{j=1}^\infty$ be an enumeration of those $e_i$'s for which $\langle f, e_i \rangle \neq 0$. Then for $m \leq k < \infty$, $$\bigg\lVert \sum_{j=m}^k \langle f, e_i \rangle e_j \bigg\rVert^2 = \sum_{j=m}^k |\langle f, e_j \rangle|^2 \to 0 \text{ as } k,m \to \infty.$$ In other words, the partial sums of $\sum_{j=1}^\infty \langle f,e_j \rangle e_j$ are Cauchy, so the series converges by completeness of $H$.