Note that the integral of interest can be written
$$\int_{-\infty}^{\infty}\frac{x\sin x}{x^2+2x+1}dx=\text{Im}\left(\int_{-\infty}^{\infty}\frac{xe^{ix}}{x^2+2x+1}dx\right) \tag 1$$
Let's examine the integral
$$\oint_C\frac{ze^{iz}}{z^2+2z+1}dz$$
where $C$ is the closed contour comprised of
$(i)$ the real-line segment from $(-R,0)$ to $(R,0)$
$(ii)$ the semicircle $C_R$ in the upper-half plane, centered at the origin with radius $R$.
Thus, we can write
$$\begin{align}
\oint_C\frac{ze^{iz}}{z^2+2z+1}dz&=\int_{-R}^{R}\frac{xe^{ix}}{x^2+2x+1}dx+
\int_{C_R}\frac{ze^{iz}}{z^2+2z+1}dz \tag 2\\\\
\end{align}$$
Note that in the limit as $R\to \infty$, the imaginary part of first integral on the right-hand side of $(2)$ equals the Cauchy Principal Value of the integral of interest in $(1)$. The second integral on the right-hand side of $(2)$ can be shown using Jordan's Lemma to go to zero in the limit as $R\to \infty$. Thus, from the residue theorem we have
$$\int_{-\infty}^{\infty}\frac{x\sin x}{x^2+2x+1}dx=\text{Im}\left(2\pi i \,\text{Res}\left(\frac{ze^{iz}}{z^2+2z+2},z=-1+i\right)\right)\tag 3$$
The residue in $(3)$ can be evaluated as
$$\begin{align}
\text{Res}\left(\frac{ze^{iz}}{z^2+2z+2},z=-1+i\right)&=
\lim_{z\to -1+i}\frac{(z+1-i)ze^{iz}}{(z+1-i)(z+1+i)}\\\\
&= \frac{(-1+i)e^{i(-1+i)}}{2i} \\\\
&=\frac{e^{-1}}{2i}\sqrt{2}e^{i(3\pi/4-1)}\tag 4
\end{align}$$
Substituting $(4)$ into $(3)$ reveals that
$$\bbox[5px,border:2px solid #C0A000]{\int_{-\infty}^{\infty}\frac{x\sin x}{x^2+2x+1}dx=\pi e^{-1}(\cos 1 -\sin 1)}$$
To begin, the function $(x,y) \mapsto e^{-xy} \sin x$ is not absolutely integrable. It is enough to show this for the region $[0,\infty)^2$.
If it were then we could apply Fubini's theorem to the iterated integrals and conclude
$$\int_0^\infty \int_0^\infty e^{-xy} | \sin x| \, dx \, dy = \int_0^\infty \int_0^\infty e^{-xy} | \sin x| \, dy \, dx $$
However,
$$\int_0^\infty e^{-xy} | \sin x| \, dy= \frac{|\sin x|}{x} $$
and this is neither Lebesgue nor improperly Riemann integrable over $[0,\infty]$.
The question seems to be is the improper Riemann integral $\int_{\mathbb{R}^2} f$ convergent, where $f(x,y) = e^{-xy} \sin x$.
For integrals over $\mathbb{R}$ the definition of an improper integral as $\lim_{a \to -\infty, b \to +\infty}\int_a^b f$ is unambiguous. For multiple integrals the definition of improper integral requires more care. The standard is
$$\tag{*}\int_{\mathbb{R}^2}f = \lim_{n \to \infty}\int_{A_n}f,$$
where $A_n$ is an admissible sequence, that is a sequence of compact Jordan measurable sets such that $A_n \subset A_{n+1}$ for all $n$ and $\cup_{n=1}^\infty A_n = \mathbb{R}^2$.
For the improper integral to be well defined, (*) must hold for any admissible sequence with convergence to a unique value. This has an important consequence:
If $\int_{\mathbb{R}^2} f$ converges as an improper integral in the
sense of (*) then $\int_{\mathbb{R}^2} |f|$ converges.
See here for a proof.
Since $\int_{\mathbb{R}^2} e^{-xy} |\sin x|$ does not converge it follows that the improper integral $\int_{\mathbb{R}^2} e^{-xy} \sin x$ does not converge in the sense of (*). In fact, it can take on different values depending on exactly how the limiting process is defined. This is analogous to the problem with rearrangements of conditionally convergent infinite series. An example is given here.
Best Answer
The integral of $$\left|\frac{\sin x}x\right|$$ diverges because you can find an interval of finite length in every half-period of the sine such that the sine exceeds, say $0.5$. Then the integral can be bounded below by a multiple of the harmonic series.