Let
- $X$ be a Hausdorff topological space,
- $\mathcal C(X)$ the space of real-valued continuous functions,
- $\mathcal C_b(X)$ the space of real-valued bounded continuous functions,
- $\mathcal C_0(X)$ the space of real-valued continuous functions that vanish at infinity, and
- $\mathcal C_c(X)$ the space of real-valued continuous functions with compact supports.
Then $\mathcal C_b(X)$ and $\mathcal C_0(X)$ are real Banach space with supremum norm $\|\cdot\|_\infty$. In Folland's Real Analysis: Modern Techniques and Their Applications, there is a theorem
4.35 Proposition. If $X$ is locally compact Hausdorff, then $\mathcal C_0(X)$ is the closure of $\mathcal C_c(X)$ in $\mathcal C_b(X)$.
Author's proof relies on a locally compact version of Urysohn's Lemma. However, in this proof, the local compactness is not needed, and I don't see anything unusual in the proof.
Could you confirm that above theorem indeed holds for arbitrary Hausdorff topological space $X$?
Update: I added related definitions from Folland's textbook.
If $X$ is a topological space and $f \in \mathcal C(X)$, the support of $f$, denoted by $\operatorname{supp}(f)$, is the smallest closed set outside of which $f$ vanishes, that is, the closure of $\{x: f(x) \neq 0\}$. If $\operatorname{supp}(f)$ is compact, we say that $f$ is compactly supported, and we define $$ \mathcal C_c(X)=\{f \in \mathcal C(X): \operatorname{supp}(f) \text { is compact}\}. $$
Moreover, if $f \in \mathcal C(X)$, we say that $f$ vanishes at infinity if for every $\epsilon>0$ the set $\{x:|f(x)| \geq \epsilon\}$ is compact, and we define $$ \mathcal C_0(X)=\{f \in \mathcal C(X): f \text { vanishes at infinity}\}. $$