Consider $f(z) = e^{-ax^2}$, and let $C$ be the rectangular contour with vertices at $-R,R,R+ib$ and $-R+ib$.
As $R \to \infty$, the two sides parallel to the imaginary axis disappear, then we have, by Cauchy's theorem:
$$
0 = \oint_C f(z) \, dz = \int_{-\infty}^\infty f(x)\, dx + \int_{\infty}^{-\infty} e^{-a(x+ib)^2} \implies\\
\int_{-\infty}^\infty e^{-ax^2 -2 a i x b +a b^2}\, dx = \int_{-\infty}^\infty f(x)\, dx = \sqrt{\frac{\pi}{a}} \implies \\
\int_{-\infty}^\infty e^{-ax^2 -2 a i x b}\, dx = \sqrt{\frac{\pi}{a}}e^{-ab^2}
$$
Taking real parts of both sides, the result follows.
Write $\sin{x} = (e^{i x}-e^{-i x})/(2 i)$. Then consider the integral
$$PV \oint_{C_{\pm}} dx \frac{e^{\pm i z}}{z (z^2-2 z+2)} $$
where $C_{\pm}$ is a semicircular contour of radius $R$ in the upper/lower half plane with a semicircular detour into the upper/lower half plane of radius $\epsilon$. For $C_{+}$, we have
$$PV \oint_{C_{+}} dz \frac{e^{i z}}{z (z^2-2 z+2)} = \int_{-R}^{-\epsilon} dx \frac{e^{i x}}{x (x^2-2 x+2)}+ i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \frac{e^{i \epsilon e^{i \phi}}}{\epsilon e^{i \phi} (\epsilon^2 e^{i 2 \phi} - 2 \epsilon e^{i \phi}+2)} \\+ \int_{\epsilon}^R dx \frac{e^{i x}}{x (x^2-2 x+2)}+ i R \int_0^{\pi} d\theta \, e^{i \theta} \frac{e^{i R e^{i \theta}}}{R e^{i \theta} (R^2 e^{i 2 \theta} - 2 R e^{i \theta}+2)} $$
For $C_-$, we have
$$PV \oint_{C_{-}} dz \frac{e^{-i z}}{z (z^2-2 z+2)} = \int_{-R}^{-\epsilon} dx \frac{e^{-i x}}{x (x^2-2 x+2)}+ i \epsilon \int_{-\pi}^0 d\phi \, e^{i \phi} \frac{e^{-i \epsilon e^{i \phi}}}{\epsilon e^{i \phi} (\epsilon^2 e^{i 2 \phi} - 2 \epsilon e^{i \phi}+2)} \\+ \int_{\epsilon}^R dx \frac{e^{-i x}}{x (x^2-2 x+2)}- i R \int_0^{\pi} d\theta \, e^{-i \theta} \frac{e^{-i R e^{-i \theta}}}{R e^{-i \theta} (R^2 e^{-i 2 \theta} - 2 R e^{-i \theta}+2)} $$
In both cases, we take the limits as $R \to \infty$ and $\epsilon \to 0$. Note that, in both cases, the respective fourth integrals have a magnitude bounded by
$$\frac{2}{R^2} \int_0^{\pi/2} d\theta \, e^{-R \sin{\theta}} \le \frac{2}{R^2} \int_0^{\pi/2} d\theta \, e^{-2 R \theta/\pi}\le \frac{\pi}{R^3}$$
The respective second integrals of $C_{\pm}$, on the other hand, become equal to $\mp i \frac{\pi}{2} $. Thus,
$$PV \oint_{C_{\pm}} dz \frac{e^{\pm i z}}{z (z^2-2 z+2)} = PV \int_{-\infty}^{\infty} dx \frac{e^{\pm i x}}{x (x^2-2 x+2)} \mp i \frac{\pi}{2}$$
On the other hand, the respective contour integrals are each equal to $\pm i 2 \pi$ times the sum of the residues of the poles inside their contours. (For $C_-$, there is a negative sign because the contour was traversed in a clockwise direction.) The poles of the denominator are at $z_{\pm}=1 \pm i$. Thus,
$$PV \int_{-\infty}^{\infty} dx \frac{e^{\pm i x}}{x (x^2-2 x+2)} \mp i \frac{\pi}{2} = \pm i 2 \pi \frac{e^{\pm i (1 \pm i)}}{(1 \pm i) (2) (\pm i)} $$
Taking the difference between the two results and dividing by $2 i$, we get that
$$\int_{-\infty}^{\infty} dx \frac{\sin{x}}{x (x^2-2 x+2)} = \frac{\pi}{2} \left (1+\frac{\sin{1}-\cos{1}}{e} \right ) $$
Note that we may drop the $PV$ because the difference between the integrals removes the pole at the origin.
Best Answer
We have that $\;z=0\;$ is clearly a triple pole of
$$f(z):=\frac{e^{i2z}}{z^3} ,\;\;\text{and in this case it is probable easier to use power series for the residue:}$$
$$\frac{e^{2iz}}{z^3}=\frac1{z^3}\left(1+2iz-\frac{4z^2}{2!}-\ldots\right)=\frac1{z^3}+\frac{2i}{z^2}-\frac2z-\ldots\implies\text{Res}_{z=0}(f)=-2$$
so taking the usual contour with a "bump" around zero, we get
$$0=\lim_{R\to\infty,\,\epsilon\to0}\oint_{\Gamma_R}f(z)=\int_{-\infty}^\infty\frac{e^{2ix}}{x^3}dx-\int_{\gamma_\epsilon}f(z)dz= \int_{-\infty}^\infty\frac{e^{2ix}}{x^3}dx+2\pi i\implies$$
$$-2\pi i=\int_{-\infty}^\infty\frac{e^{2ix}}{x^3}dx=\int_{-\infty}^\infty\frac{\cos2x+i\sin2x}{x^3}dx\implies \int_{-\infty}^\infty\frac{\sin2x}{x^3}dx=-2\pi$$
the last equality following from comparing real and imaginary parts in both sides. The above though is just CPV (Cauchy's Principal Value) of the integral, since it doesn't converge in the usual sense of the word.