The question is:
$$ \int_\Gamma \frac{dz}{z^2+1}$$

Here is how i thought, we can divide it into two contour and then deform continuously the inner curve to a circle around $i$ but my problem is here how should i deform the bigger contour around $-i$ i couldn't do that, because we can't pass through singularity, what do you think? any suggestion would be great,
Thanks


Read the fine print viz. $\oint_\Gamma f(z)dz=2\pi i\sum_{w\in S}\color{blue}{I(\Gamma,\,w)}\color{red}{\operatorname{Res}(f,\,w)}$, with $S$ the set of poles of a holomorphic $f$ the closed rectifiable curve $\Gamma$ encloses, so $w\in S$ has winding number $I(\Gamma,\,w)$. Your contour integral is$$2\pi i\left(\color{blue}{2}\color{red}{\lim_{z\to i}\frac{1}{z+i}}+\color{blue}{1}\color{red}{\lim_{z\to-i}\frac{1}{z-i}}\right)=2\pi i(2/(2i)+1/(-2i))=\pi.$$