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

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

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

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

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

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

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

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

So I'm up to the point of having to produce a \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 \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!