I already proved it by contradiction in the following way:
Negating $\lim_{x \to a} f(x) = f(a)$ assures the existence of $\epsilon>0$ such that $\forall n \in \mathbb{N}$ we can find $x_n \in X$ such that $0<|x_n-a| < 1/n \to 0$, but also $|f(x_n) - f(a)| \ge \epsilon$, which implies $\lim x_n = a,$ without $\lim f(x_n) = f(a)$, contradiction.
I'm looking for a direct proof of this result.