I am not sure how does the integral was did here. More preciselly, How to go from the first line to the second line? Shouldn't it be $$\frac{4 \pi}{(2 \pi)^3} \int _{0} ^{\infty} p^2 e^{ip*r}/(2 E_p)$$ ? (x-y is purelly spatial)
There is a ##\cos(\theta)## in the dot product which brings out the ipr and causes the difference in the exponentials when you integrate over ##d(\cos(\theta))##