Let $f:D \to \mathbb{R}$ be a differentiable function and $x_0 \in D$ . Then for $x \to x_0$ $$f(x)-f(x_0) = \frac {f(x)-f(x_0)}{x-x_0} (x-x_0) \to f'(x_0) \cdot 0 =0$$ Now it supposedly follows that $\lim_{x\to x_0} f(x) = f(x_0)$, i.e. that $f$ is continuous. Wouldn't you need the additional assumption that the limit $\lim_{x\to x_0} f(x) $ exists as a finite number for this last step?
Otherwise I could generally have $\lim_{x\to x_0} f(x)-g(x) = 0 $ for $g=f$, and $\lim_{x\to x_0} f(x) = \infty$ not in $\mathbb{R}$. What am I missing here?
What you're missing is that $f(x_0)$ is a constant. This really only uses that fact that$$\lim_{x\to x_0}f(x)-a=0\iff\lim_{x\to x_0}f(x)=a.$$