Variant 1: Harmonic functions have the mean value property,
$$f(z) = \frac{1}{2\pi} \int_0^{2\pi} f(z + re^{i\varphi})\,d\varphi$$
if $f$ is harmonic in $\Omega$ and $\overline{D_r(z)} \subset \Omega$.
$u$ is an entire harmonic function, hence
$$u(0) = \frac{1}{2\pi}\int_0^{2\pi} u(e^{i\varphi})\,d\varphi = \frac{1}{2\pi}\int_0^{2\pi} \cos(\varphi)e^{\cos\varphi}\cos (\sin\varphi) - \sin(\varphi)e^{\cos\varphi}\sin(\sin\varphi)\,d\varphi.$$
Whether we write $z$ and $re^{i\varphi}$ or $(x,y)$ and $(r\cos \varphi, r\sin\varphi)$ is completely immaterial. The complex notation is just more convenient sometimes.
Variant 2: Consider the analytic function $f = u+iv$.
Since $u$ and $v$ are both real, and $d\varphi$ is also real, we have
$$\begin{align}
\int_0^{2\pi} u(\cos\varphi,\sin\varphi)\,d\varphi &= \operatorname{Re}\left(\int_0^{2\pi} u(\cos\varphi,\sin\varphi)\,d\varphi + i\int_0^{2\pi} v(\cos\varphi,\sin\varphi)\,d\varphi\right)\\
&= \operatorname{Re} \int_0^{2\pi} f(e^{i\varphi})\,d\varphi.
\end{align}$$
Now,
The path integral over some closed curve is zero, over an analytic function.
is not correct as stated. On the one hand, the closed curve must not wind around any point in the complement of the function's domain - but since we have an entire function, that is vacuously satisfied here. More pertinent in the case at hand is that the integral theorem concerns only integrals with respect to $dz$ (it's a theorem about holomorphic differential forms), but here the integrand is $f(z)\,d\varphi$, not $f(z)\,dz$. Thus Cauchy's integral theorem does not apply.
However, for integrals over a circle, we have a simple correspondence between $dz$ and $d\varphi$. If we parametrise the circle as $\gamma(\varphi) = z_0 + r e^{i\varphi}$, then we have
$$dz = \gamma'(\varphi)\,d\varphi = ire^{i\varphi}\,d\varphi = i(z-z_0)\,d\varphi,$$
so we get
$$\int_0^{2\pi} f(e^{i\varphi})\,d\varphi = \int_{\lvert z\rvert = 1} f(z)\frac{dz}{iz},$$
and we see that that leads to Cauchy's integral formula,
$$\frac{1}{i} \int_{\lvert z\rvert = 1} \frac{f(z)}{z}\,dz = 2\pi\: f(0).$$
Finding the residue of the meromorphic function
$$
f(z):=\frac{(z+z^{-1})^{10}}{2^{10}iz}
=\frac{1}{2^{10}i}\frac{(z^2+1)^{10}}{z^{11}}.\tag{1}
$$
is not difficult.
But i don't know how to calculate the residue of that, since the pole is of the 10th order.
You are probably thinking about this formula for calculating residue at poles. But it is unnecessary here.
All you need is to find out the coefficient of $z^{-1}$ in (1), which means you want the coefficient of $z^{10}$ in $(z^2+1)^{10}$. By the binomial theorem, one has
$$
\frac{10!}{5!5!}=\frac{10\cdot 9\cdot 8\cdot 7\cdot 6}{5\cdot 4\cdot 3\cdot 2}=9\cdot 4\cdot 7.
$$
Hence the residue at $0$ is
$$
\frac{63}{2^{8}i}
$$
and by the residue theorem, the value of the integral is thus
$$
2\pi i\cdot \frac{63}{2^{8}i}=\frac{63\pi}{128}.
$$
[Added:] Without complex analysis, one can still calculate the integral in just a few steps using the recursive formula of calculating $\int \cos^nx\,dx$ ($n>0$) and taking the advantage that we are integrating over the interval $[0,2\pi]$:
$$
\begin{align}
\int_{0}^{2\pi}\cos^{10}x\,dx
&= \frac{9}{10}\int_{0}^{2\pi}\cos^{8}x\,dx \\
&= \frac{9}{10}\frac{7}{8}\int_{0}^{2\pi}\cos^{6}x\,dx\\
&= \frac{9}{10}\frac{7}{8}\frac{5}{6}\int_{0}^{2\pi}\cos^{4}x\,dx\\
&= \frac{9}{10}\frac{7}{8}\frac{5}{6}
\frac{3}{4}\int_{0}^{2\pi}\cos^{2}x\,dx\\
&= \frac{9}{10}\frac{7}{8}\frac{5}{6}
\frac{3}{4} \pi=\frac{63\pi}{128}.
\end{align}
$$
Best Answer
Let $z=e^{i\theta}$, then $dz=ie^{i\theta}d\theta=(-\sin \theta+i\cos \theta)d\theta$.
Next, we note that
$$e^{-1/z}=e^{-\cos \theta}\left(\cos (\sin \theta)-i\sin(\sin \theta)\right)$$
and thus
$$\begin{align} e^{-1/z}dz&=e^{-\cos \theta}\left(\cos (\sin \theta)-i\sin(\sin \theta)\right)(-\sin \theta+i\cos \theta)d\theta\\\\ &=e^{-\cos \theta}\left(-\sin \theta \cos (\sin \theta)+\cos \theta \sin(\sin \theta)+i(\cos \theta \cos (\sin \theta)+\sin \theta \sin(\sin \theta))\right)\\\\ &=e^{-\cos \theta}\left(-\sin (\theta-\sin \theta)+i\cos(\theta +\sin \theta) \right) \end{align}$$
Note that the first term $e^{-\cos \theta}(-\sin (\theta-\sin \theta))$ is an odd function of $\theta$ and inasmuch as it is also periodic with period $2\pi$, its integral $\int_0^{2\pi}e^{-\cos \theta}(-\sin (\theta-\sin \theta))d\theta=0$. We are left with
$$\oint_C e^{-1/z}dz=\int_0^{2\pi}e^{-\cos \theta}(i\cos(\theta +\sin \theta))d\theta$$