Solving 2D Poisson equation using complex analysis In 2D, the Poisson equation
$$
\nabla^2 \Phi(\vec{x}) = \delta^{(2)}(\vec{x})
$$
admits the solution
$$
\Phi(\vec{x}) = \frac{1}{2\pi}\log(|\vec{x}|) + \text{constant}\,. \tag{1}
$$
By using Fourier transforms, we know that the integral
$$
\Phi(\vec{x}) = \int \frac{d^2 \vec{k}}{(2\pi)^2} \frac{-e^{i \vec{k}\cdot \vec{x}}}{\vec{k}^2} \tag{2}
$$
is a formal solution but it is divergent.
What is the consistent way to give a meaning to Eq.(2) such that we can use complex analysis to compute the solution Eq.(1)? I don't want to solve this equation by using polar coordinates. I want to use the analytic structure of the integrand in Eq.(2), together will complex analysis theorems, e.g. Cauchy theorems. So my question would be really: what is the path in the complex $\vec{k}$-plane that allows me to integrate Eq.(2)?
Denoting $\vec{k}=(k_1,k_2)$, we see that in the complex $k_1$-plane there is a pole at $k_1=\pm i k_2$. Is there a prescription to reduce the computation of Eq.(1) to computation of residues, for example?
 A: We see that
$$\mathscr{F}\{\Phi\}(\vec k)=\frac{1}{k^2}\tag1$$
for $|\vec k|\ne 0$.  But $(1)$ is not true for all $\vec k\in \mathbb{R}^2$.
We can solve, instead, the problem
$$\nabla^2 \Phi(\vec x)-\varepsilon^2  \Phi(\vec x)=\delta^{(2)}(\vec x)\tag2$$
where $\varepsilon\in \mathbb{R}$. Now, taking the 2-D Fourier transform $(2)$, we can assert that
$$\mathscr{F}\{\Phi\}(\vec k)=-\frac{1}{k^2+\varepsilon^2}\tag3$$
Taking the inverse Fourier transform of $(3)$ and applying the residue theorem, we see that
$$\begin{align}
\Phi(\vec x)&=-\frac1{(2\pi) ^2}\int_{-\infty}^\infty \int_{-\infty}^\infty \frac{e^{ik_xx}e^{ik_yy}}{k_x^2+k_y^2+\varepsilon^2}\,dk_x\,dk_y\\\\
&=-\frac1{(2\pi) ^2}\int_{-\infty}^\infty  2\pi i \left(\frac{e^{ik_xx}e^{-\sqrt{k_x^2+\varepsilon^2}\,|y|}}{2i\sqrt{k_x^2+\varepsilon^2}}\right) \,dk_x\\\\
&=-\frac1{2\pi}\int_0^\infty  \frac{e^{-\sqrt{k_x^2+\varepsilon^2}\,|y|}}{\sqrt{k_x^2+\varepsilon^2}} \cos(k_x x)\,dk_x\tag4
\end{align}$$
In THIS ANSWER, I showed that the right-hand side of $(4)$ is equal to $K_0(\varepsilon \sqrt{x^2+y^2})$.  Thus, we have from $(4)$ that
$$\Phi(\vec x)=-\frac1{2\pi}K_0(\varepsilon |\vec x|)\tag 5$$
Finally, using the small argument asymptotic expansion for the modified Bessel function of the second kind reveals that
$$\begin{align}
\Phi(\vec x)&\sim -\frac1{2\pi}\left(-\gamma-\log\left(\frac{\varepsilon |\vec x|}{2}\right)\right)\\\\
&=\frac1{2\pi}\log(|\vec x|)+\text{constant}
\end{align}$$
as was to be shown!
