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$.