Solution (source code)

= Solution

For fixed momentum put
$$
E_k=\sqrt{v^2k^2+m(T)^2}.
$$
In the contour formula, $F(z)=1/(E_k^2-z^2)$ has poles at $z=\pm E_k$. Deforming the contour onto those poles and using the oddness of $\coth(z/(2T))$ gives the standard <Bosonic Matsubara sum>
$$
\boxed{
T\sum_{n\in\mathbb Z}
\frac1{\omega_n^2+E_k^2}
=\frac1{2E_k}\coth\left(\frac{E_k}{2T}\right).}
$$
Equivalently,
$$
\frac1{2E_k}\coth\left(\frac{E_k}{2T}\right)
=\frac{1+2n_B(E_k)}{2E_k},
$$
where $n_B(E)=1/(e^{E/T}-1)$ is the <Bose-Einstein distribution>. The first term is the zero-point fluctuation and the second is its thermal occupation.