I would like to compute the below integral $$I = \int_{S_n}\frac{1}{z + \tan{z} - i}dz$$ where $S_n$ is the square with vertices $n\pi(1+i), n\pi(1-i), n\pi(-1+i), n\pi(-1-i)$. If we consider $f(z) = z + \tan{z} - i$, we can see that $f$ has simple routes $z_n$ only, hence $\frac{1}{f(z)}$ has simple poles only. Therefore: $$I = 2{\pi}i\sum_{z_n}\operatorname{Res}(f,z_n) = 2{\pi}i\sum_{z_n}\frac{1}{f'(z)}$$
Could you help with the rest of the solution, or even correct my thought if not correct?