Let $f$ be a function with the property that every point of discontinuity is a removable discontinuity, i.e., $\lim_{y \to x}f(y)$ exists for all $x$, but $f$ may be discontinuous at some (even infinitely many) numbers $x$. Define $g(x)= \lim_{y\to x}f(y)$. Prove that $g$ is continuous.
Since $g(a)= \lim_{y\to a}f(y)$, by definition, it follows that for any $\epsilon \gt 0$ there is a $\delta \gt 0$ such that $|f(y)-g(a)|\lt \epsilon$ for $0\lt |y-a| \lt \delta$. This means that
$$g(a)-\epsilon \lt f(y) \lt g(a)+\epsilon$$. for $0\lt |y-a| \lt \delta$.
What I need to show is that if $|x-a| \lt \delta$, we have
$$g(a)-\epsilon \lt \lim_{y\to x}f(y) \lt g(a)+\epsilon$$.
I'm having trouble reaching this conclusion with the information I have. I'd appreciate any solutions or suggestions.