No, in general, the locally uniform limit of uniformly continuous functions is not uniformly continuous. For an example, consider
$$h_n(x) = \begin{cases} -n &, x \leqslant -n \\ x &, -n < x < n\\ n &, x \geqslant n\end{cases}$$
and
$$f_n(x) = h_n(x)\cdot x.$$
Then all $f_n$ are uniformly continuous, and the convergence is uniform on all compact subsets of $\mathbb{R}$, but the limit function $f(x) = x^2$ is not uniformly continuous.
You get a uniformly continuous limit if the sequence is uniformly equicontinuous, for example. (The uniform convergence of $f_n$ on all of $\mathbb{R}$ implies the uniform equicontinuity of $(f_n)$, so that is a special case of this sufficient criterion.)
Indeed we can find such $(f_n)$. We generalize the assumption as follows:
Assumption. $X$ is a perfectly normal space1), and $\mu$ is a finite regular measure2) on the Borel $\sigma$-algebra $\mathcal{B}(X)$.
Although this assumption might sound a bit technical, we know that:
Every metrizable space is perfectly normal.
Every Borel measure on a perfectly normal space is regular. See p. 71 in "Measure Theory" vol. 2, Springer-Verlag, Berlin 2007, by V. I. Bogachev (Corollary 7.1.9).
In particular, the assumption will be satisfied by any Borel probability measure $\mu$ on a metric space $X$. So the above assumption covers a wide range of examples, including OP's.
Now, let $L^0(X)$ be the set of all real-valued Borel-measurable functions, and let $\mathcal{H}$ be the set of all $f \in L^0(X)$ which are $\mu$-a.e. limit of sequence in $C(X,\mathbb{R})$. Then we claim that $\mathcal{H} = L^0(X)$. To this end, we make several observations:
- $\mathcal{H}$ is a vector space over $\mathbb{R}$.
- $\mathcal{H}$ is closed under convergence in measure.
Proof. Let $(g_n)$ be a sequence in $\mathcal{H}$ that converges to some $g \in L^0(X)$ in $\mu$-measure. By passing to a subsequence if necessary, we may assume that
$$\mu(\{|g_n - g|>2^{-n-1}\}) < 2^{-n-1}.$$
Now, since each $g_n$ is in $\mathcal{H}$, we can find $f_n \in C(X,\mathbb{R})$ such that
$$\mu(\{|f_n-g_n|>2^{-n-1}\}) < 2^{-n-1}.$$
Using the standard trick, these altogether imply that
$$\mu(\{|f_n - g|>2^{-n}\}) < 2^{-n}.$$
So by the Borel–Cantelli lemma, $\mu(\{|f_n - g|>2^{-n} \text{ i.o.}\}) = 0$ and therefore $f_n \to g$ holds $\mu$-a.s., proving $g \in \mathcal{H}$ as required.
- For any Borel-measurable set $E$, the indicator function $\mathbf{1}_E$ lies in $\mathcal{H}$.
Proof. We claim that, for each Borel-measurable $E \subseteq X$ and $\varepsilon > 0$, we can find a continuous function $f\in C(X,\mathbb{R})$ such that $\mu(\{f \neq \mathbf{1}_E\}) < \varepsilon$. We note that this claim implies $\mathbf{1}_E \in \mathcal{H}$, using a similar technique as in the proof above.
So we turn to the proof of the claim. Using the regularity of $\mu$, choose closed sets $F$ and $K$ such that
\begin{align*}
\begin{array}{cp{2em}c}
F \subseteq E, && \mu(E\setminus F) < \varepsilon/2, \\
K \subseteq X\setminus E, && \mu((X\setminus E)\setminus K) < \varepsilon/2.
\end{array}
\end{align*}
Now by noting that $X$ is perfectly normal, we can choose a continuous function $f : X \to [0, 1]$ such that $f^{-1}(\{1\}) = F$ and $f^{-1}(\{0\}) = K$. It is easy to check that this function satisfies the desired condition.
- Any $f\in L^0(X)$ is the $\mu$-a.e. limit of a sequence of simple functions.
Proof. Consider
$$g_n = \frac{\lfloor 2^n f\rfloor}{2^n} \mathbf{1}_{\{-n \leq f < n\}}.$$
Combining all these observations proves the desired claim.
1) A topological space $X$ is perfectly normal if for every disjoint closed subsets $F_0$ and $F_1$ of $X$, there exists a continuous function $f:X\to[0,1]$ that perfectly separates $F_0$ and $F_1$, in the sense that $f^{-1}(\{0\}) = F_0$ and $f^{-1}(\{1\}) = F_1$.
2) A Borel measure on a topological space $X$ is called regular if for every Borel-measurable $E\subseteq X$ and $\varepsilon > 0$, there exists a closed set $F_{\varepsilon}$ such that $F_{\varepsilon}\subseteq E$ and $\mu(E\setminus F_{\varepsilon})<\varepsilon$.
Best Answer
The continuity of the limit of a uniformly convergent sequence in $\mathcal{CB}(E)$ is seen by essentially the same proof as in the case when $E$ is a metric space.
Fix an arbitrary $x_0 \in E$. For any $\varepsilon > 0$, there is an $n(\varepsilon)$ such that $\lVert f_n - f\rVert_\infty < \varepsilon/3$ for all $n \geqslant n(\varepsilon)$. Choose an $n\geqslant n(\varepsilon)$. Since $f_{n}$ is continuous at $x_0$, there is a neighbourhood $U$ of $x_0$ such that
$$\lvert f_n(x) - f_n(x_0)\rvert \leqslant \frac{\varepsilon}{3}$$
for all $x\in U$. Then we have
$$\lvert f(x) - f(x_0)\rvert \leqslant \lvert f(x) - f_n(x)\rvert + \lvert f_n(x) - f_n(x_0)\rvert + \lvert f_n(x_0) - f(x_0)\rvert < \frac{\varepsilon}{3} + \frac{\varepsilon}{3} + \frac{\varepsilon}{3} = \varepsilon$$
for all $x\in U$. So for all $\varepsilon > 0$, the preimage $f^{-1}\bigl(D_\varepsilon(f(x_0))\bigr)$ of the disk of radius $\varepsilon$ around $f(x_0)$ is a neighbourhood of $x_0$, and hence $f$ is continuous at $x_0$. Since $x_0$ was arbitrary, $f$ is continuous.
If the codomain of the functions is an arbitrary metric space instead of $\mathbb{C}$, the same proof, with $\lvert a-b\rvert$ replaced by $d(a,b)$, shows the continuity of uniform limits.
If the codomain is an arbitrary uniform space (Hausdorff or not, that makes no difference), the same proof also works with small modifications. If we know that every uniform structure is induced by a family of pseudometrics, all we need to change from the proof for arbitrary metric spaces as the codomain is that we need to add a "for every pseudometric $d$ in the family of pseudometrics defining the uniform structure" at the beginning of the proof. If we don't know that uniform structures can always be induced by pseudometrics or don't want to use that fact, we use the fact that for every entourage $W$ on the codomain, there is a symmetric entourage $V$ with $V^3 \subset W$. Then there is an $n$ such that $(f(x),f_n(x)) \in V$ for all $x\in E$, the continuity of $f_n$ ensures the existence of a neighbourhood $U$ of $x_0$ such that $(f_n(x),f_n(x_0)) \in V$ for all $x\in U$, and thus we have $(f_n(x),f_n(x_0)) \in V^3\subset W$ for all $x\in U$, which shows the continuity of $f$ in $x_0$.
The conclusion that the uniform limit - it need not even be the limit of a sequence, it can be the limit of a net/filter as well, the proof remains essentially unchanged - of continuous maps is continuous holds in all settings where the statement makes sense, that is, for maps $X\to Y$ where $X$ is a topological space and $Y$ a uniform space. Neither space needs to be Hausdorff, first countable, or have other nice properties (beyond what is implied by $Y$ being a uniform space).