While reading the book "Modern Electrodynamics" by Andrew Zangwill, on page 13 I've encountered a Dirac function integral representation. The proof the book provides is the following:
\begin{align*} \int_{-\infty}^\infty \text{d}k\, e^{ikx} &= \int_0^\infty \text{d}k\, e^{ikx} + \int_0^\infty \text{d}k\, e^{-ikx} \\ &= \lim_{\epsilon \to 0} \left[ \int_0^\infty \text{d}k\, e^{ik(x+i\epsilon)} + \int_0^\infty \text{d}k\, e^{-ik(x-i\epsilon)} \right]. \end{align*} The convergence factors make the integrands zero at the upper limit, so $$ \int_{-\infty}^\infty \text{d}k\, e^{ikx} = \lim_{\epsilon \to 0} \left[ \frac{i}{x + i \epsilon} - \frac{i}{x - i \epsilon} \right] = \lim_{\epsilon \to 0} \frac{2 \epsilon}{x^2 + \epsilon^2} = 2 \pi \delta(x). $$ (Original image here.)
I don’t see how the convergence makes the first term inside the limit vanish at the upper limit. I can understand the rest from there as the the $k$-independent factor appears while integrating and the final conclussion is from one of the informal dirac delta definitions.