In quantum field theory, we often calculate some integrations using Wick rotation. In the following, I will carefully deal with an integration involving Wick rotation. In the end, I have found that I was confused.
The integration is \begin{eqnarray*} & & \int\frac{d^{4}k}{(2\pi)^{4}}\frac{1}{k^{2}+i\epsilon}e^{-ik\cdot x}\\ & = & \frac{1}{(2\pi)^{4}}\int d^{3}ke^{i\mathbf{k}\cdot\mathbf{x}}\int_{-\infty}^{\infty}dk_{0}\frac{1}{k_{0}^{2}-(E_{k}-i\epsilon)^{2}}e^{-ik_{0}t}\\ & \equiv & \frac{1}{(2\pi)^{4}}\int d^{3}ke^{i\mathbf{k}\cdot\mathbf{x}}\times\mathrm{I} \end{eqnarray*}
with \begin{eqnarray*} \mathrm{I} & = & \int_{-\infty}^{\infty}dk_{0}\frac{1}{k_{0}^{2}-a^{2}}e^{-ik_{0}t}\\ a & = & E_{k}-i\epsilon=\sqrt{m^{2}+\mathbf{k}^{2}}-i\epsilon \end{eqnarray*}
Now we will use Wick rotation to calculate $\mathrm{I}$. Note that $\pm a$ are two singularities of the integrand. Consider following contour. The radii of coutours $l_{5},l_{6}$ are both $R$ and $R\rightarrow\infty$.
According to contour integral theorem, we can see \begin{eqnarray*} \mathrm{I} & = & \int_{-\infty}^{\infty}dk_{0}\frac{1}{k_{0}^{2}-a^{2}}e^{-ik_{0}t}\\ & = & \int_{l_{1}}dz\frac{1}{z^{2}-a^{2}}e^{-izt}+\int_{l_{2}}dz\frac{1}{z^{2}-a^{2}}e^{-izt}\\ & = & \bigg(\int_{l_{5}}dz\frac{1}{z^{2}-a^{2}}e^{-izt}+\int_{l_{3}}dz\frac{1}{z^{2}-a^{2}}e^{-izt}\bigg)+\bigg(\int_{l_{4}}dz\frac{1}{z^{2}-a^{2}}e^{-izt}+\int_{l_{6}}dz\frac{1}{z^{2}-a^{2}}e^{-izt}\bigg)\\ & & \bigg[\text{note: set }z=ik_{E}^{0}\text{ in }l_{3},l_{4}\text{ and combine }l_{5},l_{6}\bigg]\\ & = & (-i)\int_{-\infty}^{\infty}dk_{E}^{0}\frac{1}{(k_{E}^{0})^{2}+a^{2}}e^{tk_{E}^{0}}+\int_{l_{6}}dz\frac{1}{z^{2}-a^{2}}(e^{-izt}+e^{izt}),\ \bigg[\text{set }z=Re^{i\phi}\text{ in }l_{6}\bigg]\\ & = & (-i)\int_{-\infty}^{\infty}dk_{E}^{0}\frac{1}{(k_{E}^{0})^{2}+a^{2}}e^{tk_{E}^{0}}\\ & & -iR\int_{0}^{\frac{\pi}{2}}d\phi e^{i\phi}\frac{1}{R^{2}e^{2i\phi}-a^{2}}(e^{-itR\cos\phi+tR\sin\phi}+e^{itR\cos\phi-tR\sin\phi})\\ & \equiv & (-i)\int_{-\infty}^{\infty}dk_{E}^{0}\frac{1}{(k_{E}^{0})^{2}+a^{2}}e^{tk_{E}^{0}}+\mathrm{II} \end{eqnarray*}
with \begin{eqnarray*} \mathrm{II} & = & -iR\int_{0}^{\frac{\pi}{2}}d\phi e^{i\phi}\frac{1}{R^{2}e^{2i\phi}-a^{2}}(e^{-itR\cos\phi+tR\sin\phi}+e^{itR\cos\phi-tR\sin\phi}) \end{eqnarray*}
Actually, I do not know how to prove $\mathrm{II}=0$ as $R\to\infty$. But if $\mathrm{II}\neq0$ as $R\to\infty$, then we can not simply obtain \begin{eqnarray*} \int_{-\infty}^{\infty}dk_{0}\frac{1}{k_{0}^{2}-a^{2}}e^{-ik_{0}t} & = & (-i)\int_{-\infty}^{\infty}dk_{E}^{0}\frac{1}{(k_{E}^{0})^{2}+a^{2}}e^{tk_{E}^{0}} \end{eqnarray*}
So who can prove $\mathrm{II}=0$ or $\mathrm{II}\neq0$ as $R\to\infty$?