I know how to show that $f(z)$ is continuous but I'm stuck at showing that $f(z)$ is analytic.
$f(z)$ is continuous:
$$|f(z)-f(a)|=\left|\int_{c} \frac{g(w)}{w-z}-\frac{g(w)}{w-a} dw\right|=\left|\int_{c} \frac{g(w)(z-a)}{(w-z)(w-a)}dw\right|$$
By ML-Formula:
$$\left|\int_{c} \frac{g(w)(z-a)}{(w-z)(w-a)}dw\right|\leq L(C)M|z-a|$$
where $L(c)$ is the length of the curve and M is bound of $\frac{g(w)}{(w-z)(w-a)}$ over the curve $C$ which exists since it is continuous on $C$.
Hence, we can let $\delta = \dfrac{\epsilon}{L(C)(M+1)}$
Any hints or solutions as to show $f(z)$ is analytic?

One way to do this would be to use Morera's theorem: https://en.wikipedia.org/wiki/Morera%27s_theorem
Since proving analyticity is local we can assume that $D = B(0,R)$ for some $R > 0$. Let $\gamma: [0,1] \rightarrow D$, then $\int_{\gamma}\int_{C}\frac{f(z)}{w-z}\,dw\,dz = \int_{C}g(w)\int_{\gamma}\frac{1}{w-z}\,dz\,dw = 0 $, since the inner integral is $0$.