Using contour integration techniques, evaluate the integral $$f(t)=\int^{\infty}_{-\infty}d\omega \frac{e^{-i\omega t}}{\omega-\omega_0+i\gamma}$$ where the integral is along the real axis and $t$, $\omega_0$, and $\gamma$ are real constants with $\gamma > 0$. Be sure to consider the integral for both
a) $t>0$ and
b) $t<0$
HINT: Apply the residue theorem around any poles.
So I believe that the function $f(\omega) = \frac{e^{-i\omega t}}{\omega-\omega_0+i\gamma}$ has a simple pole at $\omega = \omega_0 -i\gamma$. Therefore, to find the residue at that pole I use method $$R(z_0)=\lim_{z\to z_0}(z-z_0)f(z)$$ and i get $$R(\omega_0-i\gamma)=\lim_{\omega\to \omega_0-i\gamma}\frac{({\omega-\omega_0+i\gamma})e^{-i\omega t}}{\omega-\omega_0+i\gamma}=e^{-i(\omega_0-i\gamma)t}=e^{-(\gamma+i\omega_0)t}$$ Then by the Residue Theorem $$\oint_C f(z)=2\pi i \sum residues $$ I get $$f(t) = 2\pi i e^{-(\gamma+i\omega_0)t}$$
I don't know if this solution is even close or that I even applied the theorem correctly. I would think that if we're only integrating along the real axis we should get a real valued solution. Also, how can we only integrate along the real axis if the pole is not on the axis? Should i take the real part of this solution ($2\pi e^{-\gamma t}\sin\omega_0 t$)? What about the 2 cases for t? Can i just say that if $t<0$ then $f(t)=2\pi i e^{(\gamma+i\omega_0)t}$? Or is there something that I'm missing entirely?
Thanks for taking the time to help.