In deriving the Feynman propagator in Timo Weigand's 2014 QFT2 notes, at the top of page 37, (equation 1.170), we use Cauchy's integral formula:
$$g(z_0)=\frac{1}{2\pi i}\oint_{C_1}\frac{g(z)}{z-z_0}\mathrm dz \tag{1.169},$$
to rewrite the equation 1.168 as a four-momentum integral:
$$\Theta(x^0-y^0)\frac{1}{2E_p}e^{-iE_p(x^0-y^0)}=-\Theta(x^0-y^0)\frac{1}{2\pi i}\oint_{C_1}\mathrm dp^0\frac{e^{-ip^0(x^0-y^0)}}{(p^0-E_p)(p^0+E_p)} \tag{1.170}.$$
In the above derivation the $+E_p$ is enclosed by the integral and the negative sign is due to the clockwise direction of the integral, we close the contour in the lower half of the $\Bbb C$-plane.
However, a straight application of equation 1.169 appears to give:
$$\Theta(x^0-y^0)\frac{1}{2E_p}e^{-iE_p(x^0-y^0)}=-\Theta(x^0-y^0)\frac{1}{2\pi i}\frac{1}{2}\oint_{C_1}\mathrm dp^0\frac{e^{-ip^0(x_0-y_0)}}{p^0(p^0-E_p)},$$
where have I gone wrong here?
Sidenote: I understand some people might believe this to be a mathematical question not a physics one, I am happy to move it if that's appropriate, but the language and notation is definitely physics and might be confusing.