Functions which are zero at infinity are closed subset of bounded functions (even then domain is not punctured) Let $X$ be an arbitrary metric space.
We say that  continuous function   $ f : X \to \mathbb{R}$  (or possibly $\mathbb{C}$) has limit at infinity $\lim_{x \to \infty} f(x)  = a$ if for every  neighborhood $U$ of $a$ holds $f^{-1}(U) = K^\complement$, for some compact $K \subset X$.
Define $C_0(X) = \{ f : \lim_{x \to \infty} f(x) = 0   \}$ where f is continuous.  And let $C_b(X)$ be the space of all continuous bounded functions.
$X$ is called a punctured metric space if there exists compact metric space  $ X'  $ and single  element $\infty \in X' $ such that $X' \setminus \{ \infty \} \cong X$  as topological space.
It was stated without a proof  that $C_0(X)$ is a closed subset of $C_b(X)$.
It is not clear what properties are required from $X$. I know how to prove this theorem for a punctured space. Also I know that every separable, locally compact $X$ is a punctured space.
All theorems in this chapter were proved for such spaces or just compact metric spaces.
On the other hand, it is possible to produce Alexandroff compactification of $X$ even when  stated conditions do not hold. just add $\infty$ to every open set with compact complement and leave other  sets intact. The only downside of this construction is that it does not have metric  structure and may not be metrizable at all as it will not be Hausdorff in case $X$ is not locally compact.
However, I don't see any problems with having no metric structure on $X'$.

Is it possible to extend this theorem to more general metric spaces using Alexandroff extension? Can we have more general theory for $C^*$-algebras in this case? (for example spaces like $C_0(L_2 ( \Omega) )$).
What mathematical problems will it entail?

Thank you for  attention.
 A: You don't need any assumptions to show that for every topological space $X$, $C_0(X)$ is a closed subspace of $C_b(X)$. Since $C_b(X)$ is a Banach space, endowed with the supremum norm, it suffices to show that the limit of every uniformly convergent sequence of functions vanishing at infinity also vanishes at infinity.
So let $(f_n)$ be a sequence in $C_0(X)$, converging uniformly to $f \in C_b(X)$. Let $\varepsilon > 0$ be given. By the uniform convergence, there is an $N$ such that $\lVert f_N - f\rVert_{\infty} < \varepsilon/2$. Since $f_N \in C_0(X)$,
$$K_{N,\varepsilon/2} := f_N^{-1}(\{ z : \lvert z\rvert \geqslant \varepsilon/2\})$$
is a closed (quasi)compact subset of $X$. Then
$$M_{\varepsilon} := f^{-1}(\{ z : \lvert z\rvert \geqslant \varepsilon\})$$
is a closed - by continuity of $f$ - subset of $K_{N,\varepsilon/2}$, and hence (quasi)compact.
Since $\varepsilon > 0$, it follows that $f \in C_0(X)$.
However, on many spaces, $C_0(X)$ is a rather boring space - namely the trivial vector space. For if there is an $f \in C_0(X) \setminus \{0\}$, then for small enough $\varepsilon > 0$ the set $f^{-1}(\{ z : \lvert z\rvert \geqslant \varepsilon\})$ is a compact subset of $X$ with nonempty interior. In infinite-dimensional Hausdorff topological vector spaces, no compact subset has nonempty interior. So $C_0(L_2(\Omega)) = \{0\}$ (unless $L_2(\Omega)$ is finite-dimensional, which happens for certain measures).
A: Here is an alternative proof I was talking about in the question:
let $X'$ be Alexandroff one point extension of $X$ with $\infty$.
Assume  $f_n$ to be a sequence of functions in $C_0(X)$ converging to a limit $f_n \rightrightarrows \varphi$ in a $\sup$-metric (uniformly).
Extend $f_n$ naturally to $X'$ by defining $f_n'(\infty) = 0$ .
$f'_n$ is still an uniformly converging sequence in $C_b(X')$ so it must have limit $f'_n \rightrightarrows \varphi' \in C_b(X')$ and by extension rule $\varphi'(\infty) =0$. But then by continuity of $\varphi'$ it holds that $ \lim_{x \to \infty}\varphi'(x) =0$, hence $\varphi'_{|X} \in C_0(X)$ . Also it easy to see that, as uniform convergence implies pointwise convergence, $\varphi'_{|X} = \varphi$, hence $\varphi \in C_0(X)$.
This implies that $C_0(X)$ is a closed subset of $C_b(X)$.
Digression:
It's not a full answer and I won't accept it. It is here only  to be an Alexandroff extension based alternative to a more classical analytic proof by Daniel Fischer. And I wrote it because I wanted to compare them.
