I've always thought that the integration notation in physics is weird, but I understood it nevertheless for a single variable, until I started reading Zee's QFT in a nutshell, where 4 dimensions are used. So I was wondering how the integration notation works.
For example, for a free theory with sources at $x_1$ and $x_2$ we have: $$ W(J)= -\frac{1}{2}\int\frac{d^4k}{(2\pi)^4}J_2(k)^*\frac{1}{k^2-m^2+i\epsilon}J_1(k) $$ Now we let: $$ J_a(x)=\delta^{(3)}(\vec{x}-\vec{x_a}) $$ where $a=1,2$. Using the Fourier transform into momentum space: $$ J(k)=\int d^4xe^{-ik\cdot x}J(x) $$ What I don't understand is that W(J) becomes: $$ W(J)=-\int\int dx^0dy^0\int \frac{dk^0}{2\pi}e^{ik^0(x^0-y^0)}\int\frac{d^3k}{(2\pi)^3}\frac{e^{ik\cdot(x_1-x_2)}}{k^2-m^2+i\epsilon} =\int dx^0\int\frac{d^3k}{(2\pi)^3}\frac{e^{ik\cdot(x_1-x_2)}}{k^2+m^2} $$ I know that the $2$ comes from the two terms being equal so don't mind that.
It says integrating over $y^0$ will get a delta function setting $k^0$ to zero, and that I don't understand.
The only thing I know (and I'm guessing but I'm not sure yet) is that: $$ J_a(k)=\int d^4xe^{-ik\cdot x}\delta^{(3)}(x-x_a)=\int dx^0e^{-ik^0\cdot x^0}\int d^3xe^{-ik\cdot x}\delta^{(3)}(x-x_a)= \int dx^0e^{-ik^0\cdot x^0}e^{-ik\cdot x_a} $$ and the integral over $x^0$ (or $y^0$) is independent of the spatial $k$ so it's outside the integral of spatial $k$, but inside the integral of temporal $k$ in the $W(J)$. And the one with the $x_a$ part is inside the spatial integral $k$. Am I correct about this?
But yeah, my questions are:
What's with the integral over $y^0$?
Why is there even a $y$? Is it equal to $x_2$?
How did the sign changed for the $m^2$ part?
How do you actually know what's inside the integral using this notation? Or actually how to read integrals like this?