Spinor vacuum energy I'm reading the calculation in the book Quantum field theory in a nutshell of A. Zee of chaoter II.5
In this chapter the vacuum energy is calculated through the path integral approach. At some point of the calculation the author arrives at
$$iET = \frac{1}{2}VT\int \frac{d^4 k}{(2\pi)^4}\log(k^2 - m^2+i\epsilon) +A $$
For me it is not clear how the $\epsilon$ appears and how the integral appears, so I would thank an explanation to how in the book it is arrived at this expression. I will show in the next lines the result at which I arrive:
As done in the book $e^{-iET} = e^{-\frac{1}{2}\mathrm{Tr}\log(\partial^2 + m^2)}$
Then 
$$\mathrm{Tr}\log(\partial^2 + m^2) = \int d^4x \int \frac{d^4k}{(2\pi)^4}\int\frac{d^4q}{(2\pi)^4} e^{i(k-q)x} \langle k \vert \log(\partial^2 + m^2) \vert q \rangle $$
From here I can't seem to make appear the expression at which the author arrives. Help to reach the expression would be greatly appreciated.
 A: From $e^{-iET} = e^{-\frac{1}{2}\mathrm{Tr}\log(\partial^2+m^2)},$ we have
$\begin{align}
iET & = \frac{1}{2}\int d^4x \int \frac{d^4k}{(2\pi)^4}\int\frac{d^4q}{(2\pi)^4} e^{i(k-q)x} \langle k \vert \log(\partial^2 + m^2) \vert q \rangle \\ 
&=\frac{1}{2}\int d^4x \int \frac{d^4k}{(2\pi)^4}\int\frac{d^4q}{(2\pi)^4} e^{i(k-q)x}\log(-k^2 + m^2) \langle k\vert q \rangle \\
&=\frac{1}{2}\int d^4x \int \frac{d^4k}{(2\pi)^4}\int\frac{d^4q}{(2\pi)^4}e^{i(k-q)x}\log(-k^2 + m^2)\int d^4x'\,\langle k \vert x'\rangle\langle x'\vert q \rangle \\
&=\frac{1}{2}\int d^4x \int \frac{d^4k}{(2\pi)^4}\int\frac{d^4q}{(2\pi)^4}e^{i(k-q)x}\log(-k^2 + m^2)\int d^4x'\,e^{i(q-k)x'} \\
&=\frac{1}{2}\int d^4x \int \frac{d^4k}{(2\pi)^4}\int\frac{d^4q}{(2\pi)^4}e^{i(k-q)x}\log(-k^2 + m^2)(2\pi)^4\delta(q-k) \\
&=\frac{1}{2}\int d^4x \int \frac{d^4k}{(2\pi)^4}\log(-k^2 + m^2)\int d^4q\,e^{i(k-q)x}\delta(k-q) \\
&=\frac{1}{2}\int d^4x\int\frac{d^4k}{(2\pi)^4}\log(-k^2+m^2)
\end{align}$
Now we have to do three things:


*

*Identify$^1$ $\int d^4x$ with $VT$;

*Change $\log(-k^2+m^2)$ to $\log(k^2-m^2)$ using$^2$ $\log(x) = \log(|x|) + i\pi$, for $x<0$;

*Make the substitution$^3$ $m^2 \rightarrow m^2-i\varepsilon$ so that we don't have to fight an infinity at $k^2 = m^2$.


We get
$\begin{align}
iET &= \frac{1}{2}\left(\int d^4x\right)\int\frac{d^4k}{(2\pi)^4}\log(-k^2+m^2) \\
&=\frac{1}{2}VT\int\frac{d^4k}{(2\pi)^4}\log(-k^2+m^2) \tag{1} \label{1} \\
&=\frac{1}{2}VT\int\frac{d^4k}{(2\pi)^4}\log(k^2-m^2+i\varepsilon) + A 
\end{align}$
Where we have absorbed$^4$ $(i\pi/2)VT\int(d^4k/(2\pi)^4)$ into $A$ (Which comes from $C$, as remarked by Zee).

$^1$Not the top standard of rigor, but Zee does a similar step earlier in his book (page 28).
$^2$See this math.SE question for a proof of the identity.
$^3$As $\varepsilon$ is going to be set to zero later, there is no need to worry about the substitution.
$^4$Thankfully, as $A$ is infinite, there is no problem with the $i\pi$ term being absorbed.

EDIT: Being more precise from \eqref{1} on, we use
$$\log(-x\pm i\varepsilon)=\log(x)\pm i\pi,$$
where $x>0$, and get
$$iET=\frac{1}{2}VT\int\frac{d^4k}{(2\pi)^4}\log(k^2-m^2+i\varepsilon) + A,$$
again absorbing the extra factor into $A$.
