Disclaimer: the knowledge I have about contour integration is solely from the book "Mathematical Methods in the Physical Sciences" by Mary L. Boas.
I am trying to understand how the following function is derived: \begin{equation} \displaystyle\lim_{\epsilon \to 0^+} \int\limits^\infty_{-\infty} \frac{e^{-ixt}}{x+i \epsilon} \; \mathrm{d} x = - 2 \pi i \Theta(t) \end{equation} where $\Theta(t)$ denotes the unit step function.
In order to do this, I start by considering the integral: \begin{equation} \int\limits_{-\infty}^\infty \frac{e^{-i x t}}{x + i \epsilon} \; \mathrm{d} x \end{equation} where $t>0$. In order to evaluate this integral I believe we can use the ``contour integration'' technique and thus I consider: \begin{equation} \oint_C \frac{e^{-i z t}}{z + i \epsilon} \; \mathrm{d} z \tag{1} \end{equation} where $C$ is the (clockwise) contour as shown in the figure:

Clearly, there is a simple pole at $z= -i \epsilon$ and the residue can be easily found: \begin{equation} \mathrm{Res}(-i \epsilon) = \displaystyle\lim_{z \to -i \epsilon}\left\{ (z+i \epsilon) \frac{e^{-i z t}}{z + i \epsilon} \right\}= e^{-\epsilon t} \end{equation} Therefore, by the residue theorem, we can evaluate equation $(1)$ as: \begin{equation} \oint_C \frac{e^{-i z t}}{z + i \epsilon} \; \mathrm{d} z = - 2 \pi i e^{-\epsilon t} \end{equation} where the minus sign is due to the fact that the contour is clockwise. Subsequently, by taking $\epsilon$ to be a very small positive constant this becomes: \begin{equation} \oint_C \frac{e^{-i z t}}{z + i \epsilon} \; \mathrm{d} z = - 2 \pi i \end{equation} Letting $z=\rho e^{i \theta}$, we can write: \begin{equation} \oint_C \frac{e^{-i z t}}{z + i \epsilon} \; \mathrm{d} z = \int\limits^\rho_{-\rho} \frac{e^{-i x t}}{x + i \epsilon} \; \mathrm{d} x + \int\limits^{-\pi}_{0} \frac{e^{-i z t}}{\rho e^{i \theta} + i \epsilon} \rho i e^{i \theta} \; \mathrm{d} \theta \tag{2} \end{equation} At this point I am stuck. I believe the second term on the right-hand side of the above equation should tend to zero as $\rho \rightarrow \infty$, however I do not see why this would be true. Any help would be much appreciated.
The second integral on the RHS is
$$i \rho \int_0^{-\pi} d\theta \, e^{i \theta} \frac{e^{-i t \rho e^{i \theta}}}{\rho e^{i \theta}+i\epsilon} = i \rho \int_0^{-\pi} d\theta \, e^{i \theta} \frac{e^{-i t \rho \cos{\theta}} e^{t \rho \sin{\theta}}}{\rho e^{i \theta}+i \epsilon}$$
The magnitude of the above integral is bounded by
$$\int_0^{-\pi} d\theta \, e^{t \rho \sin{\theta}} = \int_0^{\pi} d\theta \, e^{-t \rho \sin{\theta}}$$
Use symmetry and $\sin{\theta} \ge 2 \theta/\pi$, and the integral is further bounded by
$$ 2\int_0^{\pi} d\theta \, e^{-2 t \rho \theta/\pi} \le \frac{\pi}{t \rho}$$
As $\rho \to \infty$, the integral therefore vanishes as $\pi/(t \rho)$ when $t \gt 0$.
When $t \lt 0$, however, the above bounds do not apply; rather, we must close above the real axis. because there are no poles there, the integral is zero. Thus, the step function.