Calculating $\int_{- \infty}^{\infty} \frac{\sin x \,dx}{x+i} $ I'm having trouble calculating the integral
$$\int_{- \infty}^\infty \frac{\sin x}{x+i}\,dx $$
using residue calculus. I've previously encountered expressions of the form 
$$\int_{- \infty}^\infty f(x) \sin x \,dx $$
where you would consider $f(z)e^{iz}$ on an appropriate contour (half circle), do away with the part of the contour that wasn't on the real axis by letting the radius go to infinity, then recover the imaginary part of the answer to get back the sine. However here, I can't replace the sine with $e^{iz}$ in my complex function because $$\operatorname{Im} \frac{e^{ix}}{x+i} \neq \frac{\sin x}{x+i}\cdots$$
How to remedy this? I'm not sure if substituting $\sin x = \frac{1}{2i}(e^{ix}-e^{-ix})$ and solving two integrals is how this problem is meant to be solved, although I'm 99% sure it would work

You're on the right track.  Rewrite $\sin{x}=(e^{i x}-e^{-i x})/(2 i)$, but evaluate separately.  For $e^{i x}$, consider
$$\frac{1}{2 i}\oint_{C_+} dz \frac{e^{i z}}{z+i}$$
where $C_{+}$ is the semicircle of radius $R$ in the upper half plane.  The integral is then zero because the pole at $z=-i$ is outside the contour.  Thus, by Jordan's lemma, we have
$$\int_{-\infty}^{\infty} dx \frac{e^{i x}}{x+i}=0$$
For the other piece, consider
$$\frac{1}{2 i}\oint_{C_-} dz \frac{e^{-i z}}{z+i}$$
where $C_{-}$ is the semicircle of radius $R$ in the lower half plane.  By Jordan's lemma and the residue theorem,
$$-\int_{-\infty}^{\infty} dx \frac{e^{-i x}}{x+i}= i 2 \pi e^{-i (-i)} = \frac{i 2 \pi}{e}$$
Note the minus sign before the integral because we require the contour to be traversed in a positive sense (counterclockwise).  Therefore
$$\int_{-\infty}^{\infty} dx \frac{\sin{x}}{x+i} = \frac{1}{2 i} \frac{i 2 \pi}{e} = \frac{\pi}{e}$$
