I'm trying to generalise a result that holds for metric spaces. Let $(X,\tau)$ be a topological space and $f:X \to \mathbb{R}$. If $x_0 \in X$ is a limit point of $X$, define
$$\limsup_{x \to x_0} f(x) = \inf\left\{ \sup_{x \in U \setminus \{x_0\}} f(x)\mid U \in \tau, U \setminus \{x_0\} \neq \emptyset\right\}$$
For $f:X \to \mathbb{C}$, is the following statement true?
$$\lim_{x \to x_0} f(x) = c \iff \limsup_{x \to x_0} |f(x) - c| = 0$$
Here $\lim_{x \to x_0} f(x) = c$ is interpreted as for every net $\langle x_j \rangle_{j \in M} \to x, \langle f(x_j) \rangle_{j \in M} \to c$. I know that it is true for metric spaces, but can this be generalised for topological spaces? I think $T_2$ condition is necessary on $(X,\tau)$.
Known facts that may help: $f:X \to Y$ is continuous at $x \in X$ iff for every net $\langle x_j \rangle_{j \in M}$ converging to $x$, $\langle f(x_j) \rangle_{j \in M}$ converges to $f(x)$.
Thinking that
$$\varepsilon(U) := \sup_{x \in U \setminus\{x_0\}} |f(x) - c| $$
is essentially the smallest possible $\epsilon$ in the $\epsilon$-$\delta$ definition, the proof seems straightforward:
If $\inf_U \varepsilon(U) = 0$, then for any $\epsilon > 0$, there exists a neighborhood $U$ such that $\varepsilon(U) < \epsilon$. This proves $f(x) \to c$ as $x \to x_0$.
If $f(x) \to c$ as $x \to x_0$, then for any $\epsilon > 0$ there exists a neighborhood $V$ such that $|f(x) - c| < \epsilon$ for $x \in V \setminus\{ x_0\}$. This gives $\inf_U \varepsilon(U) \leq \varepsilon(V) \leq \epsilon$ and the claim follows by letting $\epsilon \downarrow 0$.