The general approach to
Let . Then:
(yes, that's the common "add and subtract the same thing" trick)
The 2nd integral gives you the derivative. The first is the kind that shows up in the fundemental theorem of calculus. There are several ways to do it, but maybe use the mean value theorem for integrals:
For each , there's an (thinking of h as positive) such that .
Thus as goes to zero, goes to , and if is continuous, then:
For the 2nd integral, switching limits and integrals is switching a limiting process, so in general isn't allowed. However, in most practical cases it will be permitted, I just want to warn you that this really needs a theorem to be justified (the ready availability of such theorems for the Lebesque integral is why it's preferred over the Riemann integral). Ignore that here, just for the sake of the derivation:
Putting it together:
It's sloppy, but that's the gist of what's going on.
In your case, that becomes (note that x is considered a constant for these purposes, so, for clarity, I won't even include it in the function notation):
, where .
The first term is .
The 2nd term gives the .
(Again, that's not going to always hold - you'd need to add some conditions to know in which cases it holds. It's a derivation, not a proof.)