I am having trouble deriving the Greens function for the three dimensional Laplacian $\nabla^2$. I wish to solve the equation
$$ -\nabla_r^2 G(r,r') = \delta(r-r') \quad\quad\quad r,r'\in\mathbb{R}^3$$
I know that $\frac{1}{4\pi|r-r'|}$ is the solution, but I would like to derive this for myself. I believe that the correct approach is to apply a Fourier transform to go from $r$ space to $k$ space:
$$ -\int dr \; e^{-ikr}\nabla_r^2 G(r,r') = \int dr\; e^{-ikr}\delta(r-r') $$
$$ k^2 \tilde{G}(k,r') = e^{-ikr'} $$
Where $\tilde{G}(k,r') \equiv \int dr \; e^{-ikr} G(r,r')$ is the Fourier transform of $G$. We can solve for $\tilde{G}$ easily:
$$ \tilde{G}(k,r') = \frac{e^{-ikr'}}{k^2} $$
And now we transform back into $r$ space:
$$ G(r,r') = \int dk\; e^{+ikr}\tilde{G}(k,r') = \int dk\;\frac{e^{ik(r-r')}}{k^2}$$
But unfortunately this integral does not converge! We can see this by integrating by parts:
$$ G(r,r') = -\int dk\;e^{ik(r-r')}\frac{d}{dk}\frac{1}{k} $$
$$ G(r,r') = -\frac{e^{ik(r-r')}}{k} + i(r-r')\int dk\;\frac{e^{ik(r-r')}}{k}$$
$$ G(r,r') = -\frac{e^{ik(r-r')}}{k} - (r-r')^2 Ei\left(ik(r-r')\right)$$
Neither the boundary term nor the error function converge when we evaluate for $k\in\mathbb{R}^3$, and it is not at all obvious that they should cancel in any meaningful way. I don't see how to arrive at the correct solution $G(r,r')=\frac{1}{4\pi|r-r'|}$