Consider the integral $$I=\int\limits_{-\infty}^{\infty}dx \frac{e^{-ixt}}{x^2-a^2}=\int\limits_{-\infty}^{\infty}dx \frac{\cos(xt)}{x^2-a^2}$$ for $t<0$ and $a>0$. The integrand has poles at $x=\pm a$ on the real axis. We can use contour integral to evaluate this.
Let us choose a contour that lies entirely in the upper half of the complex plane. Let the contour be so indented that the smaller semicircles $C_1$ and $C_2$, each of radius $\epsilon$, goes over the poles at $x=\pm a$, and the larger semicircle $\Gamma$ also lies in the upper half of the complex plane (so that contribution from it vanishes).
With this choice of contour, I want to show that $I=0$. This is a famous integral that arises in solving the wave equation by the method of Green's function. But my physics textbooks do not work out this integral explicitly, by considering different parts of the contour piece by piece. See page 125, figure 50 here.
For this contour, using residue theorem and Jordan's lemma, gives (schematically),
$$0=\int\limits_{-\infty}^{-a-\varepsilon} +\int\limits_{-a-\varepsilon}^{-a+\varepsilon}+\int\limits_{-a+\varepsilon}^{a-\varepsilon}+\int\limits_{a-\varepsilon}^{a+\varepsilon} +\int\limits_{a+\varepsilon}^{+\infty}.$$
In the limit, $\varepsilon\to 0$, the sum of the 1st, 3rd and fifth integrals reduce to the required integral I. Thus, $$I+\int\limits_{-a-\varepsilon}^{-a+\varepsilon}+\int\limits_{a-\varepsilon}^{a+\varepsilon}=0.$$ Therefore, in the limit $\varepsilon\to 0$, $$I=i\pi{\rm Res}_f(z=+a)+i\pi{\rm Res}_f(z=+a)\\ =i\pi\left(\frac{e^{-iat}}{2a}\right)+i\pi\left(\frac{e^{iat}}{-2a}\right)\\ =\frac{\pi}{a}\sin(at).$$
This video suggests that the required integral is nonzero. But it does not agree with the notes I linked. What is going on?
$\def\o{\omega}$ I assume you mean the following quotation:
Observe that the integral in question: $$ I(k)=\int\limits_{-\infty}^{\infty} \frac{e^{-i\o t}}{\o^2-c^2k²}d\o,\tag1 $$ in fact does not exist in the usual sense (for $ck\in\mathbb R$) but only as (for example) a corresponding Cauchy principal value.
I would assume that the claim quoted above is meaningful only if the integral $(1)$ is understood as including the semicircle paths to bypass the poles and fixing the paths to lie in the upper complex half-plane.
This understanding is consistent with the later definition of the advanced Green's function which fixes the paths for bypassing the poles to lie in the lower complex half-plane.