From the book "An Introduction to Quantum Field Theory" by Peskin and Schroeder, in page 27, they give the following derivation:
We have the amplitude:
$$ D(x - y) = \frac{1}{(2\pi)^3} \int \text{d}^{3}p \frac{1}{2 E_{p}} \exp \left(-i p \cdot (x- y) \right) $$
And if we consider the case where $x - y$ is spacelike: $x^{0} - y^{0} = 0$, $\vec{x} - \vec{y} = \vec{r}$, then the amplitude becomes:
$$ D(x - y) = \frac{1}{(2\pi)^3} \int \text{d}^{3}p \frac{1}{2 E_{p}} \exp \left(i \vec{p} \cdot \vec{r} \right) \tag{1} $$
Changing to spherical coordinate, we get:
$$ = \frac{2 \pi}{(2\pi)^3} \int_{0}^{\infty} \text{d}p \frac{p^{2}}{2 E_{p}} \frac{\exp\left(ipr\right) - \exp\left(-ipr\right)}{i p r} \tag{2} $$
This part is where I get lost. I don't know how they got from the exponential function, $\exp \left(i \vec{p} \cdot \vec{r} \right)$, to something of the form:
$$\frac{\sin(pr)}{pr}$$
My initial guess was to used identities with Bessel functions. Knowing that $\vec{p} \cdot \vec{r} = p r \cos\left(\alpha\right)$, for some $\alpha$, I tried with the identities mentioned in NIST DLMF and wikipedia, but to be honest, I don't know how to continue.
If someone could give me a clue, I will appreciate. Thank you!.
The solution is very simple, and I feel dumb for not catch it before. Thank you @Sal.
We consider a changing of coordinates that make the vector $\vec{r}$ rest over the z-axis, with this the dot product becomes $\vec{p} \cdot \vec{r} = p r \cos(p_{\theta})$ where $p_{\theta}$ is the zenith angle of $\vec{p}$. Plugging this in (1), we get:
$$ D(x - y) = \frac{2 \pi}{(2\pi)^3} \int_{0}^{\infty} \text{d}p \frac{p^{2}}{2 E_{p}} \left[ \int_{0}^{\pi} \text{d}p_{\theta} \sin \left(p_{\theta}\right) \exp \left(i p r \cos \left(p_{\theta}\right) \right) \tag{3} \right] $$
From here the integral is straightforward.
The reason why this works is because $\vec{r}$ is fixed, the integral (1) only depends on the magnitude of $\vec{p}$ and $\vec{r}$ and the relative position between both vectors, then the expression is invariant under a rotation, that give us the freedom to set $\vec{r}$ in wherever place we want. One solution would be to make the dependency of the projection angle only of one of the spherical angle (in the original expression, $\alpha$ depends on both) because the dependency of the azimuthal angle is more hard to work, then we chose the polar angle, which give us the integral from before.