$M$ is a closed subspace of the Hilbert space $H$, and x $\in H$.
Call $d = \inf_{y \in M} ||x - y||^2$
Show that there exist a sequence of elements $y_n$ of M such that $||y_n - x ||^2 \rightarrow d$ .
So I would like to prove that there exists a sequence of $y_n$ s.t.
$$||y_n||^2 - 2\langle x,y_n\rangle + ||x|| \rightarrow d $$
The solution of your problem is an easy application of the proposition below:
Theorem: Let $A$ be a nonempty subset of $\mathbb{R}$ and $A$ is bounded below. Then there is a $m\in\mathbb{R}$ such that
$m$ is a lower bound for $A$ and
given any $\epsilon>0$ there exists $a\in A$ such that $m\leq a<m+\epsilon$
If $d=\inf_{y\in M} \|x-y\|^2$ then for $\epsilon=1$ there must be a $y_1\in M$ such that $d\leq\|x-y_1\|^2<d+1$ and for $\epsilon=1/2$ there must be a $y_2\in M$ such that $d\leq\|x-y_2\|^2<d+1/2$ and continue in this fashion. The sequence $(y_n)$ satisfies the desired convergence.