We have the following theorem from Stein and Shakarchi's Real Analysis Book 3 that says if $H$ is a Hilbert space, $f \in H$, and $S$ is a closed subspace of $H$, then there is an element $g_0 \in S$ such that $\|f-g_0\| = \inf_{g \in S}\|f-g\|$.
The proof starts out by letting $d = \inf_{g \in S}\|f-g\|$ and considering a sequence $\{g_n\} \subset S$ with the property that
$$\|f-g_n\| \rightarrow d \text{ as }n \to \infty $$
I'm having trouble seeing why such a sequence $\{g_n\}$ should exist. My intuition is telling me that I need to use the epsilon characterization of infimum. That is, if $A$ is a set of real numbers and $d := \inf A$, then
$$\forall \epsilon > 0, \exists x \in A \text{ such that }x < d + \epsilon$$
For every $n\in\mathbb{N}$ there must be an element $g_n\in S$ such that $d\leq ||f-g_n||<d+\frac{1}{n}$, this indeed follows from the epsilon characterization of infimum. By the squeeze theorem $||f-g_n||\to d$.