I think I have constructed some necessary steps in proving continuity. I continued with my sequential approach.
The set $E\subseteq X$ is dense in this context.
Let $p\in X$ and $x_n \to p$ $(x_n \neq p)$ be any. We can split the sequence in two subsequences: one, $(x_{e_n})$ consists of only points of $E$ and the other, $(x_{k_n})$ of the limits of $E$.
We have that $g(x_{e_n})\to g(p)$.
For each $x_{k_n}$ we can have a Cauchy sequence $(y_n)$ in $E$ such that $y_n\to x_{k_n}$ and $g(y_n)\to g(x_{k_n})$.