Equal-time 2-point correlator and divergent (?) integral Assume a massless scalar field in 3+1 dimensions which can be written as
$$
\phi(t,\vec{x})=\int\frac{d^3k}{\sqrt{(2\pi)^32k}}\left(a(\vec{k})e^{-ikx}+a^\dagger(\vec{k})e^{ikx}\right)\, ,
$$
where $\vec{k}$ is the momentum (natrual units), $k=\vert\vec{k}\vert$, $kx=k_\mu x^\mu$ is the inner product of the four-vectors and $a(\vec{k})$ and $a^\dagger(\vec{k})$ obey the familiar commutator relations for the creation and annihilation operators.
Now I am interested in the equal-time 2-point correlator function $\langle 0\vert\phi(t,\vec{x}_1)\phi(t,\vec{x}_2)\vert 0\rangle$. If we pull out a piece of paper we can find
$$
\langle 0\vert\phi(t,\vec{x}_1)\phi(t,\vec{x}_2)\vert 0\rangle =\int\frac{d^3k}{(2\pi)^32k}e^{i\vec{k}\cdot(\vec{x}_1-\vec{x}_2)}\, .
$$
My approch to solve this integral explicitly is to transform it into spherical coordinates. Let $r:=\vert\vec{x}_1-\vec{x}_2\vert$. Thus, one can find
$$
\langle 0\vert\phi(t,\vec{x}_1)\phi(t,\vec{x}_2)\vert 0\rangle =\int\limits_0^\infty dk\, k^2\int\limits_{-1}^1d\cos(\theta)\int\limits_0^{2\pi}d\varphi\,\frac{1}{(2\pi)^32k}e^{ikr\cos(\theta)}\\
=\frac{2\pi}{2(2\pi)^3ir}\int\limits_0^\infty dk\, (e^{ikr}-e^{-ikr})\, .\,\,\,\,\,\,\,\,\,(1)
$$
Note, that the exponentials can be decomposed into a $2i\sin(kr)$. This integral looks divergent to me. But someone told me that I should define a new integral with a regulator $\epsilon>0$:
$$
I(\epsilon)=\int\limits_0^\infty dk\, (e^{ikr}-e^{-ikr})e^{-\epsilon k}\, .
$$
This integral can be calculated rather easily. Now I can take the limit $\epsilon\rightarrow 0$ and see that $I(0)$ converges and hence the two-point correlator from above converges.
My questions are:

*

*Why is the interchange of limits possible such that I can even use
$I(\epsilon\rightarrow 0)$ to express the two-point correlator?

*Is this integral still a Riemann-integral? Since we made, in at least my eyes, the divergent integral in eq. (1) converge somehow.

 A: Your original integral diverges, and hence the equation defining $\phi(x,t)$ is not well defined as written. As you've shown, there's simply no way around that. Since your result when considering $I(\epsilon)$ is finite, it simply cant be equal to what you get if you use your original expression for $\phi$.
I believe that the correct way to think about it is to simply go back and re-define  what you mean by the field $\phi$. That is, the real definition of the $\phi$ is
$$
\phi(t,\vec{x})= \lim_{\epsilon\to 0} \int\frac{d^3k}{\sqrt{(2\pi)^32k}}\left(a(\vec{k})e^{-ikx}+a^\dagger(\vec{k})e^{ikx}\right)e^{-\epsilon k/2}.
$$
This works since, if the integral were actually convergent and sufficiently well behaved, then you could exchange the integral and the limit and do away with the $\epsilon$ from the start—leaving you with an answer that would agree with the original definition. In the case that it diverges, then you've worked your exponential regulator into the theory.
A: You have actually obtained the right answer in $(1)$ which is $$\langle0|\phi(x_1)\phi(x_2)|0\rangle=\frac{1}{8\pi |x_1-x_2|}\big[\delta(|x_1-x_2|)-\delta(|x_2-x_1|)\big]$$
Schwartz $(12.75)$. Looking at above expression you can see the correlator function is not analytical so special care has to be taken while using a regularization scheme. The way you have deformed UV region of your theory you obtain something like $\frac{1}{ir\pm\epsilon}$, since $\epsilon\to0$ any multiple of $r$ with it can be redfined to $\epsilon$, which have delta function hidden inside them.
You could have gone to another regularization scheme $m\to0$ where you obtain the same issue of $\frac{1}{r}$ and no $\delta(r)$. Sadly, I couldn't find the missing piece of $\delta(r)$ in this calculation.
The crux lies in non-analytical behavior of the above correlator, Schwartz sec $12.6$.
