I am interested specifically in calculating the following integral. From what I understand, we can create a contour around the two poles in the complex plane and simply use the residue theorem. I am however, having a little bit of trouble accomplishing this.
$$\int_{-\pi}^{\pi}\frac{dk_0}{2\pi}\frac{e^{ik_0\cdot(n-m)}}{4\sin^2\frac{k_0}{2}+\omega^2}.$$
I have calculated that the poles are at $k_0=\pm i\cosh^{-1}[1+\frac{1}{2}\omega^2]$, but I do not know how to complete this calculation.
Edit
I have a result of $$-\frac{\sin(z_+(n-m))}{\sin z_+}.$$
Where $z_+=i\cosh^{-1}[1+\frac{1}{2}\omega^2]$. I am not convinced that this is correct. The top of the contour with vertices $\{(-\pi,0),(\pi,0),(\pi,iL),(-\pi,iL)\}$ is giving me trouble as I have no idea if $$\lim_{L\to\infty}\int_{\pi}^{-\pi}dx\frac{e^{i(x+iL)(n-m)}}{4\sin^2(\frac{x+iL}{2})+w^2}=0$$ is correct.
(Partial answer)
If I were you, I would make the change of variable $z := e^{ik_0}$, because (1) it maps the domain of integration $[-\pi,\pi]$ to a natural contour, namely the unit circle $C$, and (2) the integrand becomes a rational expression. Indeed, since $\sin^2(\frac{k_0}{2}) = \frac{1}{2}(1 - \cos k_0)$ and $\cos k_0 = \frac{1}{2}(z + \bar{z})$, with $\bar{z} = z^{-1}$ on the unit circle, this change of variable translates in the following manner : $$ \int_{-\pi}^\pi \frac{\Bbb dk_0}{2\pi} \frac{e^{ik_0(n-m)}}{4\sin^2(\frac{k_0}{2}) + \omega^2} = \oint_C \frac{\Bbb dz}{2\pi iz} \frac{z^{n-m}}{2\left(1-\frac{1}{2}(z+z^{-1})\right) + \omega^2} = -\oint_C \frac{\Bbb dz}{2\pi i} \frac{z^{n-m}}{(z-\lambda)^2} $$ with $\lambda = 1 + \frac{\omega^2}{2}$. This new integrand possesses a second-order pole at $z = \lambda$ (but it may lie outside the unit disk) and another potential pole at the origin according to the value of the exponent $n-m$.