Let's consider $\displaystyle \displaystyle f(\zeta)=\frac{1-e^{2i\zeta}}{\zeta^2}$. Then, clearly $\displaystyle f$ is analytic except it has a simple pole at $\displaystyle 0$. So, we may define a family of contours $\displaystyle C\left(\varepsilon,R\right),\quad 0<\varepsilon<R$ given by $\displaystyle C\left(\varepsilon,R\right)=\Gamma_R\cup\gamma_{\v arepsilon}\cup [-R,\varepsilon]\cup[\varepsilon,R]$ where $\displaystyle \Gamma_R$ is the semi-circle on the $\displaystyle x$-axis going through $\displaystyle -R,iR,R$ and $\displaystyle \gamma_\varepsilon$ is the semi-circle on the $\displaystyle x$-axis passing through $\displaystyle -\varepsilon,i\varepsilon,\varpepsilon$ and $\displaystyle [-R,-\varepsilon],[\varepsilon,R]$ are just the intervals on the real line; of course orient $\displaystyle C\left(\varepsilon,R\right)$ counterclockwise. Note then by the Residue Theorem that

$\displaystyle \displaystyle 0=\int_{C\left(\varepsilon,R\right)}f(\zeta)d\zeta =\int_{\Gamma_R}f(\zeta)d\zeta+\int_{\gamma_{\vare psilon}}f(\zeta)d\zeta+\int_{[-R,\varepsilon]}f(\zeta)d\zeta+\int_{[R,\varepsilon]}f(\zeta)d\zeta$

Evidently it's true that

$\displaystyle \displaystyle |f(z)|=\frac{\left|1-e^{2iz}\right|}{z^2}\leqslant \frac{2}{|z|^2}$

and so it easily follows that

$\displaystyle \displaystyle \int_{-\infty}^{\infty}\frac{1-e^{2i\zeta}}{\zeta^2}d\zeta=\pi \text{Res}\left(f(\zeta),0\right)=\pi i(-2i)=2pi$

but the whole point to picking $\displaystyle f(\zeta)$ was that $\displaystyle \sin^2(\zeta)=\frac{1}{2}\text{Re}\left(1-e^{2i\zeta}\right)$ and thus

$\displaystyle \displaystyle \int_{-\infty}^{\infty}\frac{\sin^2(x)}{x^2}dx=\frac{1}{4 }\text{Re}\int_{-\infty}^{\infty}\frac{1-e^{2i\zeta}}{\zeta^2}d\zeta=\frac{\pi}{2}$