Stuck on proof using Cauchy's integral formula I posted my attempted proof to this question here but I realized that I was wrong in taking the limit, and that the proof did not make sense. So I am still stuck on this problem
let $f: \Omega \rightarrow \mathbb{C}$ be analytic and $z_0 \in \mathbb{C}$. 
Define
$$g(z) = \begin{cases} 
      \frac{f(z)-f(z_0)}{z- z_0} & z \not = z_0 \\
      f'(z_0) & z = z_0 
   \end{cases}$$
now pick $\varepsilon$ small enough so that $\overline{D(z_0, \varepsilon)} \subset \Omega$
Show that whenever $z \in D(z_0, \varepsilon)$
$$\frac{g(z) - g(z_0)}{z-z_0} = \frac{1}{2\pi i}\int_{\partial D(z_0, \varepsilon)}\frac{f(\zeta)}{(\zeta-z)(\zeta-z_0)^2}d\zeta$$
So is Cauchy's integral formula still the right way to go? I end up getting that 
$$\frac{g(z) - g(z_0)}{z-z_0} = \frac{f(z) - f(z_0)}{z-z_0} - \frac{1}{z-z_0}\int_{\partial D(z_0, \varepsilon)} \frac{f(\zeta)}{(\zeta-z_0)^2}d\zeta$$ and I am not sure how to proceed from here
 A: Here is an approach that avoids the messy calculation. Fix $z$ and $z_0$ in $D(z_0, \varepsilon)$. Then, the residue theorem gives
$\frac{1}{2\pi i}\int_{\partial D(z_0, \varepsilon)}\frac{f(\zeta)}{(\zeta-z)(\zeta-z_0)^2}d\zeta=\frac{f'(z_0)(z_0-z)-f(z_0)}{(z_0-z)^{2}}+\frac{f(z)}{(z-z_0)^{2}}=\frac{f(z)-f(z_0)}{(z-z_0)^{2}}-\frac{f'(z)}{z-z_0}.$
On the other hand, by direct substitution,
$\frac{g(z)-g(z_0)}{z-z_0}=\frac{f(z)-f(z_0)}{(z- z_0)^2}-\frac{f'(z_0)}{z-z_0}.$
A: The answer above is slick, but if the exercise comes before the residue theorem,  maybe we can brute force this. For convenience,  write $w$ for $\zeta$. All integrals are over $\partial D.$ Fix $z,z_0\in D.$
It's easy to see that $g$ is analytic in $\Omega$, (it has a removable singularity at $z=z_0.)$
Then, we have 
$\tag1 g(z)=\frac{1}{2\pi i}\int \frac{g(w)dw}{w-z}$
$\tag2 f(z)=f(z_0)+(z-z_0)g(z).$
All integrals of the form 
$\tag3 \int \frac{dw}{w-z}-\int \frac{dw}{w-z_0}$
are equal to zero, because both $z$ and $z_0$ are contained in $D$.
Now, substitute $(2)$ into $(1)$ and use $(3)$ find that
$g(z)=\frac{1}{2\pi i}\int \frac{f(w)dw}{(w-z_0)(w-z)}-\frac{1}{2\pi i}\int \frac{f(z_0)dw}{(w-z_0)(w-z)}=\frac{1}{2\pi i}\int \frac{f(w)dw}{(w-z_0)(w-z)}.$ 
From here, using the fact that $g(z_0)=f'(z_0)=\frac{1}{2\pi i}\int \frac{f(w)dw}{(w-z_0)^{2}}$, it is a routine calculation:
$\frac{g(z)-g(z_0)}{z-z_0}=\frac{1}{2\pi i(z-z_0)}\left [ \int \frac{f(w)dw}{(w-z_0)(w-z)}-\int \frac{f(w)dw}{(w-z_0)^{2}} \right ]=$
$\frac{1}{2\pi i(z-z_0)}\int\left [ \frac{f(w)(w-z_0)dw}{(w-z_0)^2(w-z)}-\int \frac{f(w)(w-z)dw}{(w-z_0)^{2}(w-z)} \right ]= \frac{1}{2\pi i}\int \frac{f(w)dw}{(w-z_0)^{2}(w-z)}$
