I know this is to be derived from Gauss' Mean Value Theorem, but I can't get the $e^{-i\theta}$. Where am I going wrong?
$f'(a) = \lim_{h \to 0}\frac{f(a+h) - f(a)}{h} = \lim_{h\to 0}\frac{1}{2pi}\int_0^{2\pi} \frac{f(a+e^{i\theta}+h)-f(a+e^{i\theta})}{h}d\theta = \frac{1}{2\pi}\int_0^{2\pi}ie^{i\theta}f'(a+e^{i\theta})d\theta$.
Clearly, this isn't correct, but I don't know where I went wrong.
First of all, since $\int_0^{2 \pi} e^{-i \theta} d\theta=0$, we can rewrite the integral as $$\frac{1}{2\pi} \int_0^{2 \pi} e^{-i \theta}(f(a+e^{i \theta})-f(a)) d \theta= \frac{1}{2 \pi} \int_0^{2 \pi} \frac{f(a+e^{i \theta})-f(a)}{a+e^{i \theta}-a} $$ Thus you are taking the mean value of the (analytic) function $$\frac{f(z)-f(a)}{z-a} $$ over the unit circle.
I will also add that this function has a removable singularity at $z=a$, with limiting value $f'(a)$.