Let's consider the following integral:
$$I(y)=\text{PV} \int_0^\infty \frac{f(x) dx}{x^2-y^2}$$
Where PV is the Cauchy principal value, $y \in \mathbb{R}, \qquad y>0$.
It can be shown by definition that:
$$\text{PV} \int_0^\infty \frac{dx}{x^2-y^2}=0$$
Then would it be correct to state:
$$I(y)=\int_0^\infty \frac{(f(x)-f(y)) dx}{x^2-y^2}$$
Where we now have a convergent integral.
What conditions should $f(x)$ satisfy for this to work? Can it be discontinuous?
The reason I'm asking is because there's a case with $f(x)=\theta(x-z)$, there $\theta$ is the Heaviside step function and $y<z$, which makes the original integral convergent.
Then applying the method I suggested leads to a different value for the integral, than the one I get by taking it directly.