General method of integration when poles on contour
Solution 1:
Your contour would look something like this except you would have an indent at $(1,0)$. Since we are excluding the pole, by Cauchy's integral formula, the integral is equal to zero. Then we can write $$ \int_0^{2\pi}\frac{dz}{z-1} $$ as $$ \int_0^{2\pi}\frac{dz}{z-1} = \lim_{\epsilon\to 0}\biggl[\int_{\epsilon}^{2\pi-\epsilon}\frac{dz}{z-1}+\int_{\pi}^0\frac{i\epsilon e^{i\theta}}{(1+\epsilon e^{i\theta})-1}d\theta\biggr] = 0 $$ where I let $z=1+\epsilon e^{i\theta}$ in the second integral so $dz = i\epsilon e^{i\theta}d\theta$. Then we have \begin{align} \int_0^{2\pi}\frac{dz}{z-1}&= -i\lim_{\epsilon\to 0}\int_{\pi}^0\frac{\epsilon e^{i\theta}}{(1+\epsilon e^{i\theta})-1}d\theta\\ &= -i\lim_{\epsilon\to 0}\int_{\pi}^0d\theta\\ &= i\pi \end{align}