I'm struggling here so please excuse if I'm writing nonsense.
I understand that the gravitational potential field, a scalar field, is given by $$\phi=\frac{-Gm}{r}$$
where $\phi$ is the gravitational potential energy of a unit mass in a gravitational field $g$ . The gradient of this is (a vector field)
$$g=-\nabla\phi=-\left(\frac{\partial\phi}{\partial x},\frac{\partial\phi}{\partial y},\frac{\partial\phi}{\partial z}\right)$$
And the divergence of this vector field is $$\nabla\cdot\nabla\phi=\nabla^{2}\phi=4\pi G\rho$$ and is called Poisson's equation. If the point is outside of the mass, then $$\rho=0$$ and Poisson's equation becomes
$$\nabla\cdot\nabla\phi=0$$
My question is, how do I express $\phi=\frac{-Gm}{r}$ as a function of $x,y,z$ so I can then end up with $\nabla\cdot\nabla\phi=0$ in empty space $r\neq 0$? I would have thought that I could write $$\phi=\frac{-Gm}{r}=\frac{-Gm}{\sqrt{x^{2}+y^{2}+z^{2}}}$$ but when I try to calculate $\nabla\cdot\nabla\phi$ from this, I don't get zero for $r\neq 0$. I'm confused.