How to prove $\int_{-\infty}^\infty dx \frac{e^{ixz}}{x-i\epsilon} = 2\pi i \Theta(z)$ where $\Theta(z)$ is the Heaviside step function. 
Let's call $f(x) = \frac{e^{ixz}}{x-i\epsilon}$. My first step is to close the contour so that the pole at $x=i\epsilon$ is contained:
$\int_C f(x) dx = \int_{-R}^R f(x) dx + \int_{C_R} f(x) dx$,
where $C_R$ is the semi-circle of radius $R$ in the upper half of the complex plane, parameterized by $z = Re^{i\theta}$, $0<\theta<\pi$.
The term on the LHS gives $2\pi i$ by the residue theorem, as $\epsilon \rightarrow 0$. The first term on the RHS gives the desired integral as $R \rightarrow \infty$. Thus I need to show that
$\int_{C_R} f(x) dx = 0$ as $R \rightarrow \infty$ for $z>0$. How?
 A: Note that for $0<\epsilon<R$
$$\begin{align}
\left|\int_0^\pi \frac{e^{izRe^{i\phi}}}{Re^{i\phi}-i\epsilon}\,iRe^{i\phi}\,d\phi\right|&\le\int_0^\pi \left|\frac{e^{izRe^{i\phi}}}{Re^{i\phi}-i\epsilon}\,iRe^{i\phi}\right|\,d\phi\tag1\\\\
&\le \frac{R}{R-\epsilon}\int_0^\pi e^{-zR\sin(\phi)}\,d\phi\tag2\\\\
&=\frac{2R}{R-\epsilon}\int_0^{\pi/2}e^{-zR\sin(\phi)}\,d\phi\tag3\\\\
&=\frac{2R}{R-\epsilon}\int_0^{\pi/2}e^{-2zR\phi/\pi}\,d\phi\tag4\\\\
&=\frac{2R}{R-\epsilon}\left(\frac{1-e^{-zR}}{2zR/\pi}\right)
\end{align}$$
which approaches $0$ as $R\to  \infty$ as was to be shown!

NOTES:
In arriving at $(1)$, we used the triangle inequality $\left|\int_a^b f(x)\,dx\right|\le \int_a^b |f(x)|\,dx$ for complex valued functions $f$ and $a\le b$.
In going from $(1)$ to $(2)$, we used the triangle inequality $|z_1-z_2|\ge ||z_1|-|z_2||$ so that for $R>\epsilon>0$, we have $|Re^{i\phi}-i\epsilon|\ge ||Re^{i\phi}|-|i\epsilon||=R-\epsilon$.
In arriving at $(3)$, we made use of the even symmetry of the sine function around $\pi/2$.
In arriving at $(4)$, we used the inequality $\sin(x)\ge \pi x/2$ for $x\in [0,\pi/2]$.
