Why is the $i\epsilon$-prescription necessary in the Klein-Gordon propagator? When evaluating the Klein-Gordon propagator, in the book by P&S, p. 31, I see that, it is customary to shift the poles and add $i\epsilon$ in the denominator. I don't understand, why this is necessary. Why can't we just use complex analysis? What is wrong in the following steps?
\begin{align}
        \int \frac{e^{ibz}}{z^2-a^2}\, dz &= (2\pi i) \left[\lim_{z\rightarrow a} (z-a) \frac{e^{ibz}}{z^2-a^2} + \lim_{z\rightarrow -a} (z+a) \frac{e^{ibz}}{z^2-a^2}\right] [\mathrm{Residue~theorem}]\nonumber\\
        %
        &= (2\pi i) \left[\lim_{z\rightarrow a} \frac{e^{ibz}}{z+a} + \lim_{z\rightarrow -a} \frac{e^{ibz}}{z-a}\right]\nonumber\\
        %
        &= (2\pi i) \left[ \frac{e^{iba}}{2\,a} - \frac{e^{-iba}}{2\,a}\right]\nonumber\\
        %
        &= \frac{i\pi}{a} \left[ e^{iba} - e^{-iba}\right]\nonumber\\
        %
        &= - \frac{2\, \pi\, \sin{ba}}{a}
    \end{align}
What goes wrong in proceeding this way? Can't we just do the integration $p^0$ as is done for the $z$-variable? Obviously, $a$ will be function of $\vec{p}$ and $m$.
 A: Note that the original integral you are trying to compute is over the real line, not over a closed contour, so the Cauchy theorem does not apply until you find a suitable way to close the contour. Due to the presence of the exponential factor $e^{ibz}$, as you have written it, one can close the contour in the upper half plane if $\mathrm{Re}\, b>0$. Let's assume that's the case. Now your two poles are actually on the real line, so we also need to specify which way to pass around them. Since you are closing the contour above, and you are picking up both of the residues, you are implying that you are passing below these two poles. If you passed above them, they would be outside your contour and would not contribute. Since you are passing below your two poles, we could equivalently describe what you did by saying that the two poles are shifted upwards on the complex plane by an infinitesimal amount $+i\epsilon$. This would guarantee that you pass below them as you integrate along the real axis. So you see that you also actually have included some $\epsilon$s in your calculation too, although you didn't acknowledge it.
For calculations in QFT, there is a correct physical prescription for which way to go around the poles, which is called the Feynman prescription, and differs from what you did above. This is covered well in P&S.
