In general the Green's function for the Helmholz equation in three-dimensional space have the form
\[ G_3(x,y) = \frac{\mathrm{e}^{-\alpha \mathrm{i} k\|x-y\|_2}}{4\pi\|x-y\|_2}, \]where \(\alpha \in \{-1,1\}\) is the sign of the chosen time harmonic dependency (\(\mathrm{e}^{\alpha \mathrm{i}\omega t}\)).
The computation of the Gradient is again based on the application of the identity
\[ \nabla(f \circ g) = (f' \circ g)\nabla g, \]together with the standard product rule. We start be simply looking at when \(y=0\) resulting in
\[\begin{aligned} \nabla_x G_3(x) &= \frac{\mathrm{e}^{-\alpha\mathrm{i} k\|x\|_2}}{4\pi}\left[\nabla\left((x^\top x)^{-1/2}\right)\right] + \frac{1}{4\pi\|x\|_2}\left[\nabla\left(\mathrm{e}^{-\alpha\mathrm{i} k\|x\|_2}\right) \right]\\ &= \frac{\mathrm{e}^{-\mathrm{i} k\|x\|_2}}{4\pi}\left[-\frac{1}{2}\left(x^\top x\right)^{-3/2}\nabla(x^\top x)\right] + \frac{1}{4\pi\|x\|_2}\left[-\alpha \mathrm{i} k\mathrm{e}^{-\mathrm{i} k\|x\|_2}\nabla\left(\|x\|_2\right)\right]\\ &= -\frac{\mathrm{e}^{-\alpha\mathrm{i} k\|x\|_2}}{4\pi\|x\|_2^{3}}x + \frac{-\alpha \mathrm{i} k\mathrm{e}^{-\mathrm{i} k\|x\|_2}}{4\pi\|x\|_2^{2}}x\\ &= -\frac{\mathrm{e}^{-\alpha\mathrm{i} k\|x\|_2}\left(\alpha \mathrm{i} k\|x\|_2 + 1\right)}{4\pi \|x\|_2^3}\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}. \end{aligned}\]Now if we want the derivative with respect to \(y\neq 0\) then it follows that
\[\begin{aligned} \nabla_x G_3(x,y) &= -\frac{\mathrm{e}^{-\alpha\mathrm{i} k\|x - y\|_2}\left(\alpha\mathrm{i} k\|x - y\|_2 + 1\right)}{4\pi \|x\|_2^3}\begin{bmatrix}y_1 - x_1\\y_2 - x_2\\y_3 - x_3\end{bmatrix}. \end{aligned}\]