Is this computation of divergence correct?
$$\mathbf{g} = \frac{Gm\mathbf{r}}{r^3}$$
$$\nabla\cdot\mathbf{g} = \frac{d}{dx}\mathbf{g}_x + \frac{d}{dy}\mathbf{g}_y + \frac{d}{dz}\mathbf{g}_z$$
$$r = |\mathbf{r}| = (x^2 + y^2 + z^2)^{1/2}$$
$$\frac{d}{dx}\mathbf{g}_x = \frac{(Gmr^3 - Gmx(3/2)r2x)}{r^6}$$
$$\frac{d}{dx}\mathbf{g}_x = Gmr^{3 - 6} - 3Gmx^2r^{1 - 6}$$
$$\frac{d}{dx}\mathbf{g}_x = Gm(r^{-3} - 3x^2r^{-5})$$
Therefore:
$$\nabla\cdot\mathbf{g} = Gm(r^{-3} - 3x^2r^{-5}) + Gm(r^{-3} - 3x^2r^{-5}) + Gm(r^{-3} - 3x^2r^{-5})$$
$$\nabla\cdot\mathbf{g} = Gm(r^{-3} - 3x^2r^{-5} + r^{-3} - 3y^2r^{-5} + r^{-3} - 3z^2r^{-5})$$
$$\nabla\cdot\mathbf{g} = Gm(3r^{-3} - 3x^2r^{-5} - 3y^2r^{-5} - 3z^2r^{-5})$$
$$\nabla\cdot\mathbf{g} = Gm(3r^{-3} - 3r^{-5}(x^2 + y^2 + z^2))$$
$$\nabla\cdot\mathbf{g} = Gm(3r^{-3} - 3r^{-5}(r^2))$$
$$\nabla\cdot\mathbf{g} = Gm(3r^{-3} - 3r^{-3})$$
$$\nabla\cdot\mathbf{g} = 0$$
I think the problem here is that you have chosen a poor example.
The formula $\nabla\cdot \mathbf g$ that you are trying to compute is one side of Gauss's law of gravity,
$$\nabla\cdot \mathbf g = -4\pi G \rho.$$
In this formula, $\rho$ is the mass density at the point where you compute $\nabla\cdot \mathbf g$.
The formula $\mathbf g = \dfrac{Gm \mathbf r}{r^3}$ can describe the gravitational field of a point-mass at $r = 0$. It can be the field of a body of spherically-symmetric mass distribution of radius $R$, but only when $r > R$. In other words, the formula applies only in empty space, where $\rho = 0$, and therefore we should find that $\nabla\cdot \mathbf g = 0$ wherever $\mathbf g = \dfrac{Gm \mathbf r}{r^3}$.
So Poisson's equation is true for this gravitational field, but it is also trivial in this case.
To construct a non-trivial example to which to apply Poisson's equation, why don't you try looking at the gravitational field inside a sphere of radius $R$ with mass $m$ and uniform density $\rho_0$. This field inside the sphere is $\mathbf g = Gm \mathbf r$. Try calculating $\nabla\cdot \mathbf g$ for that case.