Relevance

Without using the Residue Theorem:

Note that the integrand has singularities at z^2 = i

==> z = [e^(πi/2 + 2πik)]^(1/2) = ±(1 + i)/√2.

So, z^2 + i = (z - (1 + i)/√2)(z + (1 + i)/√2).

------------

Now, we apply the Generalized Cauchy Integral Formula, deforming C into two disjoint closed contours

C₁ and C₂, which enclose z = (1 + i)/√2 and z = -(1 + i)/√2, respectively (and separately).

(i) ∫c₁ e^(iz) dz/(z^2 + i)^2

= ∫c₁ e^(iz) dz/[(z - (1 + i)/√2)(z + (1 + i)/√2)]^2

= ∫c₁ [e^(iz)/(z + (1 + i)/√2)^2] dz/(z - (1 + i)/√2)^2

= 2πi * (d/dz) [e^(iz)/(z + (1 + i)/√2)^2] {at z = (1 + i)/√2}, by Gen. Cauchy

= (πi/4) e^((-1 + i)/√2) [(1 + i)√2 + 2], after some work.

(ii) ∫c₂ e^(iz) dz/(z^2 + i)^2

= ∫c₂ [e^(iz)/(z - (1 + i)/√2)^2] dz/(z + (1 + i)/√2)^2

= 2πi * (d/dz) [e^(iz)/(z - (1 + i)/√2)^2] {at z = -(1 + i)/√2}, by Gen. Cauchy

= (πi/4) e^((1 - i)/√2) [(-1-i)√2 + 2].

-----------

Therefore, ∫c e^(iz) dz/(z^2 + i)^2

= (πi/4) e^((-1 + i)/√2) [(1 + i)√2 + 2] + (πi/4) e^((1 - i)/√2) [(-1-i)√2 + 2].

I hope this helps!