$\textbf{Problem}$: Find the value of the integral
$$I=\int_{-\infty}^0 P.V.\frac{1}{\pi}\int_{-\infty}^{\infty} \frac{\partial f}{\partial y} \frac{(x-y)}{(x-y)^2+z^2} \ dy \ dz,$$
with $f$ a sufficiently well behaved function of $y$ alone, and $P.V.$ meaning we are to take the principal value of the integral.
$\textbf{Part of a solution}$: Exchanging the order of integration, we have
$$I = P.V.\frac{1}{\pi}\int_{-\infty}^{\infty} \frac{\partial f}{\partial y} \int_{-\infty}^0 \frac{(x-y)}{(x-y)^2+z^2} \ dz \ dy.$$ and we let $$J=\frac{1}{\pi}\int_{-\infty}^0 \frac{(x-y)}{(x-y)^2+z^2} \ dz$$
Now, when $x\neq y$ this integrates to $1/2$, so that $I=0$ if we assume $f$ is compact.
If $x-y$ is small, say $\epsilon$, then we have
$\pi \delta(z) = \lim_{\epsilon \to 0} \frac{\epsilon}{\epsilon^2 +z^2}$, so that $J=1/2$.
However, I do not know how to simultaneously take the limit of the other part of the integral, which I believe is something of the form:
$$K= \lim_{y\to x}P.V.\int_{-\infty}^{\infty}\frac{\partial f}{\partial y} \ dy$$
I know the solution should be $-f(x) +c_o$ for $c_o$ some constant, as the physics of the problem yields $H(x,z)_{xx}+H(x,z)_{zz}=0$, with the boundary condition $\partial H /\partial z|_{z=0} = \partial f/\partial x$.
This makes solving the integral explicitly ancillary, however, I want to solve more complicated versions of this integral, so I'd like to understand the analysis.
Any tips on how to solve the remaining part of the integral are appreciated.
We have the integral of interest $I(x)$ given by
$$I(x)=\frac{1}{\pi}\int_{-\infty}^{0} \int_{-\infty}^{\infty}\frac{df(y)}{dy}\frac{x-y}{(x-y)^2+z^2}\,dy\,dz$$
Integrating the inner integral by parts and exploiting that $f$ is a test function gives
$$\begin{align} I(x)&=-\frac{1}{\pi}\int_{-\infty}^{0} \int_{-\infty}^{\infty}f(y)\frac{\partial}{\partial y}\left(\frac{x-y}{(x-y)^2+z^2}\right)\,dy\,dz\\\\ &=\frac{1}{\pi}\frac{d}{dx}\int_{-\infty}^{0} \int_{-\infty}^{\infty}f(y)\left(\frac{x-y}{(x-y)^2+z^2}\right)\,dy\,dz \end{align}$$
Interchanging the order of integration yields
$$\begin{align} I(x)&=\frac{1}{\pi}\frac{d}{dx} \int_{-\infty}^{\infty}f(y)\left(\int_{-\infty}^{0}\frac{x-y}{(x-y)^2+z^2}\,dz\right)\,dy\\\\ &=\frac{1}{\pi}\frac{d}{dx} \int_{-\infty}^{\infty}f(y)\left(\frac{x-y}{|x-y|}\left.\arctan\left(\frac{z}{|x-y|}\right)\right|_{z\to-\infty}^{z=0}\right)\,dy\\\\ &=\frac12 \frac{d}{dx} \int_{-\infty}^{\infty}f(y)\left(\frac{x-y}{|x-y|}\right)\,dy\\\\ &=\frac12 \int_{-\infty}^{\infty}f(y)\frac{d}{dx}\left(\frac{x-y}{|x-y|}\right)\,dy\\\\ &=\frac12 \int_{-\infty}^{\infty}f(y)2\delta (x-y)\,dy\\\\ &=f(x) \end{align}$$
as expected!