In a lecture note (https://canvas.harvard.edu/courses/76589/files/folder/Lectures?), there is such kind of integral, $$\int \frac{d^{D}k}{(2\pi)^{D}} \frac{1-\cos(\vec{k}\cdot \vec{x})}{k^2}=\int \frac{d^{D}k}{(2\pi)^{D}}[ \frac{1}{k^2}-\frac{\cos(\vec{k}\cdot \vec{x})}{k^2}]$$. The author gives the answer in D=1 and D=2, $$\int\frac{dk}{2\pi}\frac{1-\cos(kx)}{k^2}=-\frac{|x|}{2}\,\,(1)$$, and $$\int^{\Lambda}\frac{d^2k}{(2\pi)^2}\frac{1-\cos(\vec{k}\cdot\vec{x})}{k^2}\approx\frac{\ln(\Lambda|x|)}{2\pi},\,\,when\, |x|\to\infty\,\,(2)$$.
It seems that the cos term can be converted into a $\Gamma$ function, say $$\int \frac{d^{D}k}{(2\pi)^{D}}\frac{e^{i\vec{k}\cdot \vec{r}}}{k^2}=\frac{2^{D-2}}{(4\pi)^{D/2}}\frac{1}{r^{D-2}}\Gamma(D/2-1)$$, when $D\to2$, it can be written as $\frac{1}{2\pi(D-2)}-\frac{1}{4\pi}(\gamma+\ln(\pi)+\ln(r^2))+O(D-2)$ (the method is similar to An asymptotic expansion involving the gamma function in QFT, here is $2+\epsilon$, and there is $4-\epsilon$). Then the D=2 result may be "derived", $$\frac{1}{(2\pi)^2}\int^{\Lambda} d^{2}k\frac{1}{k^2}= \frac{1}{2\pi}\ln(\Lambda)$$, and the only r dependent term in cos term is $-\frac{1}{2\pi}\ln(r)$, then $\int^{\Lambda}\frac{d^2k}{(2\pi)^2}\frac{1-\cos(\vec{k}\cdot\vec{x})}{k^2}\approx\frac{\ln(\Lambda|x|)}{2\pi}$. Of course, there are still a divergent term $\frac{1}{2\pi(D-2)}$.
But how to calculate the D=1 case? And is there any other method to calculate such integral?