As shown by @eyeballfrog,
$$\int_0^{\infty} \frac{e^{\cos(x)}\sin(\sin(x))}{x} dx =\int_0^\pi \frac{\sin[\sin(u)]}{\sin(u)}\sin^2\left(\frac{u}{2}\right)e^{-\cos(u)}du$$
Further manipulating:
$$\begin{align}
\int_0^\pi \frac{\sin[\sin(u)]}{\sin(u)}\sin^2\left(\frac{u}{2}\right)e^{-\cos(u)}du
&=\int_0^\pi \frac{\sin[\sin(u)]}{\sin(u)}\left(\frac{1-\cos u}{2}\right)e^{-\cos(u)}du \\
&=\frac12\int_{-\pi}^\pi \frac{\sin[\sin(u)]}{\sin(u)}\left(\frac{1-\cos u}{2}\right)e^{-\cos(u)}du \\
&=\frac14\Im\int_{-\pi}^\pi \frac{1-\cos u}{\sin(u)}e^{-\cos(u)+i\sin u}du \\
&=\frac14\Im\int_{-\pi}^\pi \frac{1-\cos u}{\sin(u)}\exp(-e^{-iu})du \\
&=-\frac14\Im\int_{-\pi}^\pi \frac{1-\cos u}{\sin(u)}\exp(-e^{iu})du \\
\end{align}
$$
Let $z=e^{iu}$, then
$$\begin{align}
\int_0^\pi \frac{\sin[\sin(u)]}{\sin(u)}\sin^2\left(\frac{u}{2}\right)e^{-\cos(u)}du
&=-\frac14\Im\int_{-\pi}^\pi \frac{2-2\cos u}{2\sin(u)}\exp(-e^{iu})du \\
&=-\frac14\Im\oint_{|z|=1} \frac{2-z-z^{-1}}{(z-z^{-1})/i}\exp(-z)\frac{dz}{iz} \\
&=\frac14\Im\oint_{|z|=1} \frac{z^2-2z+1}{z^2-1}\frac{e^{-z}}z dz\\
&=\frac14\Im\underbrace{\oint_{|z|=1} \frac{z-1}{z+1}\frac{e^{-z}}z dz}_{I}\\
\end{align}
$$
Note that the contour integral has to be understood in the Cauchy principal value sense, since a pole lies on the path of integration.
Consider the contour $C$, a unit circle with a semicircle indent to the right at $z=-1$.
By residue theorem, $$\oint_C \frac{z-1}{z+1}\frac{e^{-z}}z dz=2\pi i\operatorname*{Res}_{z=0}\frac{z-1}{z+1}\frac{e^{-z}}z$$
$$\implies I+\int_{\text{indent}}\frac{z-1}{z+1}\frac{e^{-z}}z dz=-2\pi i$$
Since the indent is a semicircle and goes clockwisely, it is not difficult to prove that
$$\int_{\text{indent}}\frac{z-1}{z+1}\frac{e^{-z}}z dz=-\frac12\cdot 2\pi i\operatorname*{Res}_{z=-1}\frac{z-1}{z+1}\frac{e^{-z}}z=-2\pi i\cdot e$$
Hence, $$I=2\pi i (e-1)$$
As a result,
$$\int_0^{\infty} \frac{e^{\cos(x)}\sin(\sin(x))}{x} dx=\frac\pi 2(e-1)$$
which has been confirmed numerically.
Notations:
$K(k)=\displaystyle\int_0^1\frac{d\phi}{\sqrt{1-k^2\sin^2\phi}}$ is a complete elliptic integral of the first kind
$K'(k)=K(\sqrt{1-k^2})$
$k_r$ is the modulus of a singular value, specifically, the solution to $\dfrac{K'(k_r)}{K(k_r)} =\sqrt r$
It turns out that the integral is both related to contour integration and elliptic functions (at least for my approach), which is quite interesting for me.
Generalization holds for $n$ a positive integer,
$$
I_n=\int_{0}^{\infty}\frac{\cos(\pi x^2)}{\cosh (\pi x)\big(\cosh (n\pi)-\cos(n\pi x)\big)}dx\\
=\begin{cases}
\displaystyle \frac{1}{\sqrt{2} \sinh (n\pi)}\left(\coth\left(\frac\pi4n\right)-{\color{red}{\frac1\pi K(k_{n^2/4})}}\right) & n\text{ even}\\[7pt]
\displaystyle \frac{1}{\sqrt{2} \sinh (n\pi)}\left(\frac{\cosh(\pi n/2)+2}{\sinh (\pi n/2)}-{\color{red}{\frac{2k_{n^2}+1}{\pi }K(k_{n^2})}}\right) & n\text{ odd}
\end{cases}
$$
Utilizing the singular values that are well known in literature (e.g. in the MathWorld site linked above) one can tabulate values for small $n$ as follows
$$
\begin{gathered}
I_1=\frac{1}{\sqrt{2} \sinh (\pi )} \left(\frac{2+\cosh \left(\frac{\pi }{2}\right)}{\sinh \left(\frac{\pi }{2}\right)}-(\sqrt{2}+1)\kappa\right)\\
I_2=\frac{1}{\sqrt{2} \sinh (2 \pi )} \left(\coth \left(\frac{\pi }{2}\right)-\kappa\right)\\
I_3=\frac{1}{\sqrt{2} \sinh (3 \pi )} \left(\frac{2+\cosh \left(\frac{3 \pi }{2}\right)}{\sinh \left(\frac{3 \pi }{2}\right)}-\frac{\sqrt[4]{3}}{3\sqrt{2}} \left(2 \sqrt{2}-2 \sqrt[4]{3}+\sqrt{3}+1\right)\kappa \right)\\
I_4=\frac{1}{\sqrt{2} \sinh (4 \pi )} \left(\coth (\pi )-\frac{\sqrt{2}+2}{4}\kappa \right)\\
I_5=\frac{1}{\sqrt{2} \sinh (5 \pi )} \left(\frac{2+\cosh \left(\frac{5 \pi }{2}\right)}{\sinh \left(\frac{5 \pi }{2}\right)}-\frac{1}{5} \left(2-2 \sqrt[4]{5} \sqrt{2}+3 \sqrt{2}+\sqrt{5}\right) \kappa \right)\\
I_6=\frac{1}{\sqrt{2} \sinh (6 \pi )} \left(\coth \left(\frac{3 \pi }{2}\right)-\frac{\sqrt{2 \sqrt{3}+3}}{3}\kappa\right)
\end{gathered}
$$
Here
$$
\kappa=\frac1{4\pi^{3/2}}\Gamma^2 \left(\frac{1}{4}\right)
$$
It is worth noticing that the red part of both cases are always an algebraic multiple of $\kappa$, a consequence of $\mathbb Q(\sqrt{-n^2})=\mathbb Q(\sqrt{-1})$. Appreciate help from @pisco on this point.
The following is a proof.
Take the real part of the trivial expansion
$$
\frac1{1-e^{-t+ix}}=\sum_{r\ge0}e^{-rt}e^{irx}
$$
to get
$$
\frac{\sinh t}{\cosh t-\cos x}=1+2\sum_{r\ge1}e^{-rt}\cos(rx)
$$
Now plug in $t=n\pi,x\to n\pi x$ and return to $I_n$
$$
\sinh(n\pi)I_n=\int_{0}^{\infty}\frac{\cos(\pi x^2)}{\cosh (\pi x)}dx+2\sum_{r\ge1}\int_{0}^{\infty}\frac{\cos(\pi x^2)\cos(n\pi rx)}{\cosh (\pi x)}dx
$$
It suffice to find the Fourier transform of $\dfrac{\cos(\pi x^2)}{\cosh (\pi x)}$.
Integrate on the rectangular contour while $R\to \infty$
$$
f(z)=\frac{\exp(i\pi z^2+iwz)}{\cosh (\pi z)\sinh(2\pi z+w)}\\[5pt]
C: -R-i\to R-i\to R+i\to -R+i \to -R-i
$$
The integrand has 3 polse in and 2 on $C$ (small semi circle pertubation is used to avoid them) and the residue theorem states
$$
\int_{-\infty}^{\infty}f(x-i)-f(x+i)dx=4\int_{0}^{\infty}\frac{\exp(i\pi x^2+wx)}{\cosh (\pi x)}dx\\
=2\pi i \text{Res}\left[f(z),i\frac\pi2;-i\frac\pi2;-w\right]+\pi i \text{Res}\left[f(z),i-\frac w{2\pi};-i-\frac w{2\pi}\right]
$$
That is
$$
\int_{0}^{\infty}\frac{\exp(i\pi x^2+wx)}{\cosh (\pi x)}dx=\left(e^{-i\pi/4}+i \exp\left(-\frac{i w^2}{4 \pi }\right)\right) \text{sech}\left(\frac{w}{2}\right)
$$
We only need the real part. Substitute $w=nr\pi$ so that
$$
\int_{0}^{\infty}\frac{\cos(\pi x^2)\cos(n\pi rx)}{\cosh (\pi x)}dx=\frac{\sqrt{2}}{4} \left(\sqrt{2} \sin \left(\frac{n^2\pi}{4}r^2\right)+1\right) \text{sech}\left(\frac{n\pi }{2}r\right)\\
\int_{0}^{\infty}\frac{\cos(\pi x^2)}{\cosh (\pi x)}dx=\frac{\sqrt{2}}{4}
$$
Then
$$
I_n=\frac{\sqrt2}{4\sinh(n\pi)}\left(1+2\sum_{r\ge1}e^{-nr\pi}\text{sech}\left(\frac{n\pi }{2}r\right)\left(\delta(n,r)+1\right) \right)
$$
where
$$
\delta(n,r):=\sqrt{2} \sin \left(\frac{\pi n^2}{4} r^2\right)=\cases{
1 & \text{$n$ and $r$ odd}\\[5pt]
0 & \text{otherwise}
}
$$
For even $n$ s, all $\delta(n,r)$ vanish so
$$
I_n=\frac{\sqrt2}{4\sinh(n\pi)}\left(1+4\sum_{r\ge1}\frac{e^{-rn\pi}}{e^{rn\pi/2}+e^{-rn\pi/2}}\right)
$$
Let $q=e^{-n\pi/2}$ be the nome, and the remaining series turns into
$$
\sum_{r\ge1}\frac{q^{-2r}}{q^r+q^{-r}}=\sum_{r\ge1}q^r-\frac1{q^r+q^{-r}}=\frac1{e^{n\pi/2}-1}-\sum_{r\ge1}\frac1{q^r+q^{-r}}
$$
to evaluate the last sum, utilize the Fourier series of
$$
\text{dn}(2Kv,k)=\frac{\pi}{2K}+\frac{2\pi}{K}\sum_{r\ge1}\frac{\cos(2r\pi v)}{q^r+q^{-r}}
$$
Here $k$ is the modulus corresponding to $q$, satisfying
$$
\frac{K'(k)}{K(k)}=\frac n2
$$
According to the definition of singular value, it is actually $k_{(n/2)^2}$ (remember $n/2$ is an integer). Related theorems state that it is an algebraic number and $K(k_{n^2/4})$ can be expressed in terms of Gamma functions.
Plug in $v=0$, note that $\text{dn}(0,k)=1$ to get
$$
\sum_{r\ge1}\frac1{q^r+q^{-r}}=\frac{K(k_{n^2/4})}{2\pi}-\frac14
$$
Finally put everything together proving the even case
$$
I_{n}=\frac{1}{\sqrt{2} \sinh (n\pi)}\left(\coth\left(\frac\pi4n\right)-\frac1\pi K(k_{n^2/4})\right)
$$
As for the odd $n$, under the notation of Iverson brackets it holds $1+\delta(n,r)=1+[2\nmid r]=2[2\nmid r]+[2\mid r]$, so
$$
I_n=\frac{\sqrt2}{4\sinh(n\pi)}\left(1+2\sum_{r\ge1}e^{-nr\pi}\text{sech}\left(\frac{n\pi }{2}r\right)\left(2[2\nmid r]+[2\mid r]\right) \right)
$$
Let $q=e^{-n\pi}$ be the nome, then
$$
\sum_{r\ge1}e^{-nr\pi}\text{sech}\left(\frac{n\pi }{2}r\right)[2\mid r]=2\sum_{l\ge1}\frac{q^{2l}}{q^l+q^{-l}}\\
=2\sum_{r\ge1}q^l-\frac1{q^l+q^{-l}}=\frac2{e^{n\pi}-1}+\frac12-\frac{K(k_{n^2})}{\pi}
$$
where the last sum is calculated above.
$$
\sum_{r\ge1}e^{-nr\pi}\text{sech}\left(\frac{n\pi }{2}r\right)[2\nmid r]=2\sum_{l\ge1}\frac{q^{2l-1}}{q^{l-1/2}+q^{-l+1/2}}
\\
=2\sum_{l\ge1}q^{l-1/2}-2\sum_{l\ge1}\frac{1}{q^{l-1/2}+q^{-l+1/2}}
$$
Similarly, utilize the Fourier series
$$
\text{cn}(2Kv,k)=\frac{2\pi}{kK}\sum_{l\ge1}\frac{\cos((2l-1)\pi v)}{q^{l-1/2}+q^{-l+1/2}}
$$
Again, $k$ is $k_{n^2}$ and $K$ is $K(k_{n^2})$. Plug in $v=0$, note that $\text{cn}(0,k)=1$ to get
$$
\sum_{l\ge1}\frac{1}{q^{l-1/2}+q^{-l+1/2}}=\frac{k_{n^2}K(k_{n^2})}{2\pi}
$$
so
$$
\sum_{r\ge1}e^{-nr\pi}\text{sech}\left(\frac{n\pi }{2}r\right)[2\nmid r]= \text{csch}\left(\frac{\pi }{2}n\right)-\frac{k_{n^2}K(k_{n^2})}{\pi}
$$
Put everything together and the odd case is proved
$$
I_n=\frac{1}{\sqrt{2} \sinh (n\pi)}\left(\frac{\cosh(\pi n/2)+2}{\sinh (\pi n/2)}-\frac{2k_{n^2}+1}{\pi }K(k_{n^2})\right)
$$
In summary, the integral is all about summing up a Fourier transform. One can generate all sorts of similar integrals by finding Fourier transforms of similar functions and using elliptic function identities to find closed form results, as long as they exist.
As an example of minor complexity, the "coupling integral" of the OP's is
$$
\int_{0}^{\infty}\frac{\sin(\pi x^2)}{\cosh (\pi x)\big(\cosh (4\pi)-\cos(4\pi x)\big)}dx=(\sqrt2-1)I_4=\frac{1}{\sinh (4 \pi )} \left(\left(1-\frac1{\sqrt{2}}\right)\coth (\pi )-\frac{\kappa}4 \right)
$$
Best Answer
Remember the equation $$\int_{-R}^{-\epsilon}+\int_{\gamma_\epsilon^+}+\int_{\epsilon}^R+\int_{\gamma_R^+}=0.$$ The argument shows that the limit of the second term is $-\pi$ and the limit of the last term is $0$. So, by this equation, the limit of the first and third terms must be $\pi$. But the limit of the first and third terms as $R\to\infty$ and $\epsilon\to 0$ is just an integral over the entire real line. So this shows exactly that the integral $\int_{-\infty}^\infty$ is equal to $\pi$, as claimed.
The point of writing $f(z)=\frac{-iz}{z^2}+E(z)$ is that the length of the contour $\gamma_\epsilon^+$ goes to $0$ as $\epsilon\to 0$. So, as long as $E(z)$ is a bounded function near $0$, its integral over $\gamma_\epsilon^+$ will go to $0$ as $\epsilon\to 0$. This means that to compute the limit you can replace the complicated function $f(z)$ by the much simpler function $\frac{-iz}{z^2}$ which you can then just explicitly integrate over $\gamma_\epsilon^+$.