Wightman Green function derivation In the book N. D. Birrell and P. C. W. Davies, "Quantum Fields in Curved Space" at pp. 52-53 the four dimensional (positive frequency) Wightman Green function is expressed in position space as $$ D^{+}(x,x') = -\frac{1}{4\pi[(t-t'-i\epsilon)^2 -|\vec{x}-\vec{x}'|^2}.\tag{3.59}$$
It is said that this result comes from solving the momentum space integral $$\frac{1}{(2\pi)^4}\int d^4p\frac{1}{p_0^2 - |\vec{p}|^2}e^{-ip_0(t-t')+i\vec{p}  ({\vec{x}-\vec{x}')}}$$ with the specific contour reported in figure 3 at p. 22 (a circle arount the positive pole). Anyway, I cannot find the above result. Instead, I find something very similar to the retarded Green function, that depends only from $\frac{1}{4\pi|\vec{x}-\vec{x}'|}$ and a $\delta$-function which fixes the time. I think that I'm getting wrong on the evaluation of something involving the $i\epsilon$ prescription used to shift the poles. Can anybody help me getting through this?
 A: The $\epsilon$ in (3.59) does not shift the poles but rather regulates the integral over 3-momentum.
More concretely, we start with (note the extra $i$ in fig. 3)
$$
iD^+(t,\vec x) = \frac{1}{(2\pi)^4}\int_{\gamma^+} dp_0\int \ d^3\vec p \,\frac{e^{-ip_0t+i\vec p\cdot \vec x}}{p_0^2-|\vec p|^2},
$$
where $\gamma^+$ is a contour that encircle only the pole in the right half-plane. By the residue theorem, we find
$$
iD^+(t,\vec x) =\frac{i}{(2\pi)^3} \int \ d^3\vec p\, \frac{e^{-i|\vec p|t+i\vec p\cdot \vec x}}{2|\vec p|}.
$$
The $\epsilon$ now enters the game to regulate the above integral as $t \rightarrow t-i\epsilon$ such that it is convergent. The rest of the details are relatively straightforward
$$
\begin{align*}
iD^+(t,\vec x) &=\frac{i}{(2\pi)^2} \int_{-1}^1d(\cos\theta)\int _0^\infty d|\vec p|\, |\vec p|^2 \frac{e^{-|\vec p|(\epsilon+it)+i|\vec p| |\vec x| \cos \theta}}{2|\vec p|}\\
&=\frac{i}{8\pi^2}\frac{1}{i|\vec x|}\int _0^\infty d|\vec p|\,e^{-|\vec p|(\epsilon+it)}(e^{i|\vec p||\vec x|}-e^{-i|\vec p||\vec x|})\\
&=\frac{i}{8\pi^2}\frac{1}{i|\vec x|}\left(\frac{1}{\epsilon+it-i|\vec x|}-\frac{1}{\epsilon+it+i|\vec x|}\right)\\
&=\frac{i}{8\pi^2}\frac{1}{i|\vec x|}\frac{2i|\vec x|}{(\epsilon+it)^2+|\vec x|^2} = -\frac{i}{4\pi^2}\frac{1}{(t-i\epsilon)^2-|\vec x|^2}
\end{align*}
$$
The regulator can be "removed" using the Sokhotski–Plemelj theorem as explained in (3.60).
