Let $$f(z) = \frac{e^{iz}}{z^2(z^2+1)}$$ Determine value of the following integral which $C$ is a simple closed curve enclosing $0$ and $i$(and not $-i$). $$I = \oint_C f(z)dz$$
Using residue theorem, I found that $I = -\pi e^{-1} - 2\pi$ but I'm interested in other methods. For instance Cauchy integral formula if it's applicable or deformation of path.
Hint: $I=\int_C \frac {e^{iz}} {z^{2}}dz-\int_C \frac {e^{iz}/(z+i)} {(z-i)}dz$. Can you evaluate each of the two terms by Cauchy's Intgeral Formula?