I was trying to find green function of a 3D wave equation using Fourier transform method. $$\left(\nabla- \frac{\partial^2}{\partial t^2} \right)G(\bar{x},t) = \delta(\bar{x})\delta(t)$$ Using Fourier transform $G(\bar{x},t)=1/(2\pi)^4 \int dw\:d^3k\:exp(-i\bar{k}\bar{x}-iwt)G(k,w) $ $$G(k,w)=\frac{1}{w^2-k^2}$$ Then we can perform integration by angles and reach this integral $$G(x,t)=\frac{1}{x}\int \frac{2k \sin(k x)}{(2\pi)^3}\frac{e^{-i w t}}{w^2-k^2}dw\:dk$$ However i have a problem with integration by variable $w$ because my poles are lying on a real axis and i don't know how to chose my path correctly. Is there some way to chose contour to get a right answer?Maybe there are some properties of green functions that allows me to chose it?
I was thinking about adding to my equation some damping term $$\left(\nabla- \frac{\partial^2}{\partial t^2}-\gamma \frac{\partial}{\partial t} \right)G(\bar{x},t) = \delta(\bar{x})\delta(t)$$ Then $$G(x,t)=\frac{1}{x}\int \frac{2k \sin(k x)}{(2\pi)^3}\frac{e^{-i w t}}{w^2-k^2+iw \gamma}dw\:dk$$ If $\gamma=+0$ two my poles are in $Im(w)<0$ but i don't get a right answer $$G(x,t)=-\frac{\delta(x-t)}{2\pi x}$$