Principal value of 1/x- equivalence of two definitions

As far as I know, the principal value of a non-summable function like $1/x$, denoted $\mathcal{P}(1/x)$, is a distribution that that acts on some smooth function $f$ in some test-function space and gives back the number:

\begin{equation} \mathcal{P}(1/x)\,\,f=\lim_{\epsilon\to 0}\int_{\mathcal{R}-[-\epsilon,\epsilon]}\frac{f(x)}{x}\,dx \end{equation}

How would you prove rigorously that this is equivalent to:

\begin{equation} \mathcal{P}(1/x)\,\,f=\lim_{\epsilon\to 0}\int\frac{x\,f(x)}{x^2+\epsilon^2}\,dx \end{equation}


I am working on the same exercise. In a previous exercise I showed that $$ \lim_{ \varepsilon \rightarrow 0^+ } \int_{|x| \geq \varepsilon} \frac{ f(x) }{x}dx = - \int_{-\infty}^\infty f'(x) \ln(|x|) dx,$$ see this post.

Now observe that $$\int_{-\infty}^{\infty} \frac{x}{x^2 + \varepsilon^2} f(x) dx = f(x) \frac{1}{2} \ln(|x^2 + \varepsilon^2|)\big|_{-\infty}^{\infty} - \int_{-\infty}^\infty f'(x) \frac{1}{2}\ln(|x^2 + \varepsilon^2|) dx$$ $$ = - \int_{-\infty}^\infty f'(x) \frac{1}{2}\ln(|x^2 + \varepsilon^2|) dx$$

Then let $\varepsilon \rightarrow 0$ to complete the proof.


One way is to observe that both those expressions are the distributional derivative of (integration against) $\log|x|$.