Let $f:\mathbb{R}\to\mathbb{R}$ and $g:\mathbb{R}\to\mathbb{R}$ be two arbitrary functions. Assume $g\in L^2(\mathbb{R})$.
I'm looking to find out the minimal set of assumptions on $f$ and $g$ such that the following integral is zero, for every $x\in\mathbb{R}$: $$ \int_\mathbb{R}\frac{f(x)-f(y)}{x-y}g(y)dy = 0 $$
Here is what I came up with so far:
Let $x\in\mathbb{R}$ be given.
Write $$ \int_\mathbb{R}\frac{f(x)-f(y)}{x-y}g(y)dy = \lim_{\varepsilon\to0} \int_{\mathbb{R}\backslash B_\varepsilon(x)}\frac{f(x)-f(y)}{x-y}g(y)dy +\lim_{\varepsilon\to0} \int_{B_\varepsilon(x)}\frac{f(x)-f(y)}{x-y}g(y)dy$$
The first summand is equal to Cauchy's principal value, and is proportional to the delta distribution, in case $z\mapsto\left[f(x)-f(z)\right]g(z)$ is holomorphic and goes to zero as $|z|$ goes to infinity. Thus, the delta distribution evaluates this function to zero.
For the second summand, assume $f$ is analytic and write $f(y)\approx f(x)+f'(x)(y-x)+\mathcal{O}((y-x)^2)$.
We find then
\begin{eqnarray} \int_\mathbb{R}\frac{f(x)-f(y)}{x-y}g(y)dy &=& \lim_{\varepsilon\to0} \int_{B_\varepsilon(x)}\frac{f(x)-f(y)}{x-y}g(y)dy \\ &=& \lim_{\varepsilon\to0} \int_{B_\varepsilon(x)}\left[f'(x)+\mathcal{O}((y-x)^2)\right]g(y)dy \nonumber \\ &=&f'(x)\lim_{\varepsilon\to0} \int_{B_\varepsilon(x)}g(y)dy+\lim_{\varepsilon\to0} \int_{B_\varepsilon(x)}\mathcal{O}((y-x)^2)g(y)dy \nonumber \\ &=& 0 \end{eqnarray}
Thus, my question is:
1) Is it true that the minimal requirements are that $f$ and $g$ be holomorphic and $z\mapsto\left[f(x)-f(z)\right]g(z)$ goes to zero as $|z|$ goes to infinity?
2) If this is the case, is the proof so far correct?
This is not at all correct. Try e.g. $f(x) = x^2$. Then $(f(x)-f(y))/(x-y) = x + y$, and the requirement on $g$ is that $\int_{\mathbb R} g(y)\; dy = 0$ and $\int_{\mathbb R} y g(y)\; dy = 0$. Somewhat more generally, if $f$ is a polynomial of degree $d$ you need the moments $\int_{\mathbb R} y^k g(y)\; dy = 0$ for $0 \le k \le d-1$.