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?