Let $\displaystyle f:\mathbb{R}\longrightarrow\mathbb{R}$ be a continuous function and differentiable everywhere $\displaystyle x\neq0$. Further, let $\displaystyle \displaystyle\lim_{x\to0}f'(x)=L$. Show that $\displaystyle f'(0)$ exists and equals $\displaystyle L$.

So here's what I've done thus far:

First note that since $\displaystyle f$ is continuous on all of $\displaystyle \mathbb{R}$, that $\displaystyle f(0)$ exists in the very least. Now, the limit statement translates into the following: given any $\displaystyle \epsilon>0$ there exists a $\displaystyle \delta>0$ such that:

$\displaystyle |x-0|<\delta\Rightarrow|f'(x)-L|<\epsilon$

However, by the mean value theorem, we get the following estimate:

$\displaystyle f(x)-f(0)=f'(\theta)(x-0)$

For some $\displaystyle \theta$. Then we get the following results:

$\displaystyle |f'(x)-L|<\epsilon$
$\displaystyle \Rightarrow|\frac{f(x)-f(0)}{x-0}-L|<\epsilon$
$\displaystyle \Rightarrow|f(x)-f(0)-L(x-0)|<\epsilon(x-0)$
$\displaystyle \Rightarrow|f'(\theta)(x-0)-L(x-0)|<\epsilon(x-0)$
$\displaystyle \Rightarrow|f'(\theta)-L|<\epsilon$

So I'm up to the point of having to produce a $\displaystyle \delta$ that works, but I don't see where it's coming from at all. Can someone point me in the right direction?

By the way, if anyone here has any general tips and tricks as to how to produce the appropriate $\displaystyle \delta$ in these type proofs, I'd love to hear them. It just seems like they come out of thin air a lot of times!