I am struggling with the following integration, $$ I = \int_{-\pi}^{\pi}\frac{e^{i(a+n)(\theta-i\eta)}}{i(\theta -i\eta)}d\theta $$ where $\eta > 0$, and $i$ is the imaginary symbol, and $a, n$ are constants. The whole integral is similar to a inverse discrete-time Fourier transform of $\frac{e^{ia(\theta-i\eta)}}{i(\theta-i\eta)}$ but with the frequency being a complex number $\kappa = \theta - i\eta$ instead of the real $\theta$.
A similar question can be found here.
Can someone give some insights solving this integration?
Update: I used mathematica and have a final formula for the integrals now, but not sure how to derive that by hand. Very naturally, by performing variable substitution, I get $$ I = -i\left( \text{Ei}(-i(n+a)(\pi+i\eta)) - \text{Ei}(i(n+a)(\pi-i\eta)) \right) $$ where $\text{Ei}(x) = \int_x^{\infty}t^{-1}e^{-t}dt$. But this is not correct!
Take $\frac{d}{dh} I(h)$ to obtain (let $a+n=\gamma)$ $$I'(h) =\gamma \,e^{\gamma h\eta}\int_{-\pi}^\pi e^{i\gamma\omega h} d\omega=2\gamma \,e^{\gamma h\eta}\frac{\sin(\pi\gamma h)}{\gamma h}$$ for $\gamma h\neq 0$. Let me assume that $\gamma >0$. Then, $I(-\infty)=0$ and $$I(t) =\int_{-\infty}^t 2\gamma \,e^{\gamma h\eta}\frac{\sin(\pi\gamma h)}{\gamma h}\,dh.$$ This may not be what you're looking for, but it is another integral representation which may help.