I've been trying to make sense of these two integrals, somehow the result seems intuitive, yet very hard to compute. We define
$$ f(x)=\frac{1}{4\pi}\delta(|x|-R)$$ and then note that $$ -\frac{1}{2}\int\int\frac{f(x)f(y)}{|x-y|}=-\frac{1}{2R}$$ and
$$\int \frac{f(x)}{|x-y|}dx=\frac{1}{|y|}\quad \text{if }|y|\geq R$$
the integration is over $R^3$, and $\delta$ is the Dirac delta function. I'd appreciate any help with this.
I am going to call $|{\bf x}| = x$, it is relatively straightforward to show that
$$ |{\bf x} - {\bf y}| = \sqrt{x^2 + y^2 - 2 xy\cos(\theta - \theta')} $$
where $\theta$ is the polar angle of ${\bf x}$, and $\theta'$ is the polar angle of ${\bf y}$. With this in mind
\begin{eqnarray} \int {\rm d}^3{\bf x}~{\rm d}^3{\bf y} \frac{f({\bf x}) f({\bf y})}{|{\bf x} - {\bf y}|} &=& \frac{1}{(4\pi)^2}\int {\rm d}\cos\theta ~{\rm d}\phi ~{\rm d}x~ x^2 \int {\rm d}\cos\theta' ~{\rm d}\phi' ~{\rm d}y~ y^2 \frac{\delta(x - R)\delta(y - R)}{\sqrt{x^2 + y^2 - 2 xy\cos(\theta - \theta')}} \\ &=& \frac{(2\pi)(4\pi)R^4}{(4\pi)^2}\int {\rm d}\cos(\theta - \theta') \frac{1}{\sqrt{R^2 + R^2 - 2R^2 \cos(\theta - \theta')}} \\ &=& \frac{R^3}{2\sqrt{2}} \int_{-1}^{+1}{\rm d}z \frac{1}{\sqrt{1 - z}} = \frac{R^3}{8} \end{eqnarray}