An equality involving the mean value property
Solution 1:
Ooh, interesting formula! Let me try...
$$\frac2{\pi}\int_0^{2\pi} f(e^{i\theta})\cos^2\left(\frac{\theta}{2}\right)\;\mathrm d\theta=\frac2{\pi}\int_0^{2\pi} f(e^{i\theta})\left(\frac{1+\cos\,\theta}{2}\right)\;\mathrm d\theta$$
$$=\frac1{\pi}\int_0^{2\pi} f(e^{i\theta})(1+\cos\,\theta)\;\mathrm d\theta$$
$$=\frac1{\pi}\left(\int_0^{2\pi} f(e^{i\theta})\;\mathrm d\theta+\int_0^{2\pi} f(e^{i\theta})\cos\,\theta\;\mathrm d\theta\right)$$
Now, let's look at the Cauchy formula
$$f(0)=\frac1{2\pi i}\oint_\gamma \frac{f(u)}{u}\mathrm du=\frac1{2\pi i}\int_0^{2\pi} \frac{f(\exp(i\theta))}{\exp(i\theta)}\mathrm d(\exp(i\theta))=\frac1{2\pi}\int_0^{2\pi}f(\exp(i\theta))\mathrm d\theta$$
and going back to the original expression we have
$$2f(0)+\frac1{\pi}\int_0^{2\pi} f(\exp(i\theta))\cos\,\theta\;\mathrm d\theta$$
How to take care of that other piece... let's start at that Cauchy formula again:
$$f(z)=\frac1{2\pi i}\oint_\gamma \frac{f(u)}{u-z}\mathrm du$$
If we differentiate with respect to $z$, we have
$$f^{\prime}(z)=\frac1{2\pi i}\oint_\gamma \frac{f(u)}{(u-z)^2}\mathrm du$$
and now we can try substituting in an anticlockwise unit-circular contour yet again:
$$f^{\prime}(0)=\frac1{2\pi i}\int_0^{2\pi} \frac{f(\exp(i\theta))}{\exp(2i\theta)}\mathrm d(\exp(i\theta))$$
$$=\frac1{2\pi}\int_0^{2\pi} f(\exp(i\theta))\exp(-i\theta)\mathrm d\theta$$
$$=\frac1{2\pi}\int_0^{2\pi} f(\exp(i\theta))\cos\,\theta\;\mathrm d\theta-\frac{i}{2\pi}\int_0^{2\pi} f(\exp(i\theta))\sin\,\theta\;\mathrm d\theta$$
Luckily, the sine is antisymmetric about $\theta=\pi$, so that the imaginary part is easily removed:
$$f^{\prime}(0)=\frac1{2\pi}\int_0^{2\pi} f(\exp(i\theta))\cos\,\theta\;\mathrm d\theta$$
Long story short... the correct expression is actually $2f(0)+2f^\prime(0)$...