$\Gamma_1$ is the line connecting $\epsilon$ to $R$.
$\Gamma_2$ is the counterclockwise upper semicircle with radius $R$.
$\Gamma_3$ is the line connecting $-R$ to $-\epsilon$.
$\Gamma_4$ is the clockwise upper semicircle with radius $\epsilon$.
Denote $\Gamma=\Gamma_1+\Gamma_2+\Gamma_3+\Gamma_4$.
I used Cauchy's integral theorem to show that
$\int_{\Gamma}^{} \frac{e^{iz}}{z}dz=0$.
Now I need to evaluate the different parts of the integral $\int_{\Gamma}^{} \frac{e^{iz}}{z}dz$ and show that $\int_{-\infty}^{\infty} \frac{\sin(z)}{z}dz=\pi$ using the fact that $\lim_{\epsilon\rightarrow 0} \int_{\Gamma_4}^{ } \frac{\sin(t)}{t}dt=-i\pi$.
So far I managed to show that $\int_{\Gamma_2}^{ } \frac{e^{iz}}{z}dz=0$.
So I am left with
$\int_{\Gamma_1}^{ } \frac{e^{iz}}{z}dz+\int_{\Gamma_3}^{ } \frac{e^{iz}}{z}dz=-\int_{\Gamma_2}^{ } \frac{e^{iz}}{z}dz \Rightarrow $
$\Rightarrow \int_{-R}^{-\epsilon} \frac{\cos(z)}{z}dz+i\int_{-R}^{-\epsilon} \frac{\sin(z)}{z}dz+\int_{\epsilon}^{R} \frac{\cos(z)}{z}dz+i\int_{\epsilon}^{R} \frac{\sin(z)}{z}dz=-\int_{\Gamma_2}^{ } \frac{\cos(z)}{z}dz-i\int_{\Gamma_2}^{ } \frac{\sin(z)}{z}dz$.
But I can't see how to evaluate these integrals. What am I missing here?