Vacuum Energy Calculation using Path Integral I am currently reading Zee's book on quantum field theory, and I am in the chapter where he is introducing Grassmann integrals.
He re-introduces the path integral evaluated for the vacuum, i.e. no sources:
\begin{equation}
Z=Ce^{-\frac{1}{2}Tr(log(\partial^2+m^2))}.
\end{equation}
We note that the trace of an operator can be written as
$$
Tr(O)=\int d^4x\int \frac{d^4k}{(2\pi)^4}\frac{d^4q}{(2\pi)^4}\langle x|k\rangle\langle k|O|q\rangle\langle q|x\rangle.
$$
Then we note that $Z=\langle 0|e^{-iHt}|0\rangle=e^{-iET}$ for the vacuum, therefore
$$
iET=\frac{1}{2}Tr(log(\partial^2+m^2)).
$$
Now what I don't understand is when he said that this is evaluated as
$$
iET=\frac{1}{2}VT\int\frac{d^4 k}{(2\pi)^4}log(k^2+m^2+i\epsilon)+A.
$$
Where $A$ is for divergent terms in the constant "$C$" earlier (this I understand).
So, my question is how did he end up from the second to the last equation to the last equation using the trace identity? 
He didn't give any information at all and he just straight up gave it as is.
 A: Use the following representations and integrals:
$$ \langle x | p \rangle  = \int \mathrm d^4 x\; e^{-ipx}$$
$$ \int \mathrm d^4 x\;e^{-ix(k-q)} = (2 \pi)^4 \delta(k-q) $$
Explicitly substituting the expression into the trace representation of an operator:
$$ \mathrm{Tr}\left[\log(\partial^2 + m ^2)\right] =\int \mathrm d^4x\int \frac{\mathrm d^4k}{(2\pi)^4}\frac{\mathrm d^4q}{(2\pi)^4}\langle x|k\rangle\langle k|\log(\partial^2 + m^2)|q\rangle\langle q|x\rangle $$
$$ = \int \mathrm d^4x\int \frac{\mathrm d^4k}{(2\pi)^4}\frac{\mathrm d^4q}{(2\pi)^4}e^{-ix(k-q)}\langle k|\log(\partial^2 + m^2)|q\rangle $$
$$ = \int \frac{\mathrm d^4k \; \mathrm d^4q}{(2\pi)^4}\langle k|\log(\partial^2 + m^2)|q\rangle \delta(k-q) = \int \frac{\mathrm d^4k}{(2\pi)^4}\langle k|\log(\partial^2 + m^2)|k\rangle $$
$$ = \int \frac{\mathrm d^4k}{(2\pi)^4}\log(-k^2 + m^2)$$
because the Fourier transform of $\partial_{\mu}$ is $ik_{\mu}$, and it's diagonal in the momentum representation. Another way to determine this is to note that $\mathrm{Tr}(\log M) = \log\det M$.
This is equivalent to the final expression, with some damping factor (the $i\epsilon$ prescription) introduced for convergence.
