If $x=(x_1, x_2)$ is a two dimensional vector, then there is $$\partial^{\mu}\partial_{\mu} \log |x|^2 = 4\pi \delta(x)$$ where $\mu=1,2$ is summed over. This was given in, for example, chapter two of Polchinski's string theory book.
The question is: If $x=(x_1, x_2, ..., x_n)$ is a $n$ dimensional vector, is there a similar equation, which relates $\delta(x)$ to the derivative of some functions?
Not solution but the tip from where you can learn it (too cumbersome for a comment).
I suppose that you consider n-dimensional Euclidean space:
$\vec r=(x_1,x_2,\ldots, x_n); \,r^2=x_1^2+x_2^2+\cdots+x_n^2$
If
$$-\Delta_rg(\vec r,\vec r')=\delta^n(\vec r-\vec r')\quad \Rightarrow$$ $$g(\vec r,\vec r')=g(|\vec r-\vec r'|)=\frac{1}{(n-2)S_{n-1}}\biggl(\frac{1}{|\vec r-\vec r'|}\biggr)^{n-2}$$ Where $S_{n-1}= \frac{2\pi^{\frac{n}{2}}}{\Gamma(\frac{n}{2})}$ - unit radius hypersphere surface area
The formula is nicely derived (using Schwinger's trick) for example, in "Mathematics for Physics" by Michael Stone and Paul Goldbarts (section 6.5.4 Green function, pp 239 - 240).