<s>[INST] Evaluate $\sum _{n=1}^{\infty } \frac{\sin \left(x \sqrt{a^2+n^2}\right)}{\left(a^2+n^2\right)^{3/2}}$ and generalize it In this post the following is proved

$$\small \sum _{n=1}^{\infty } \frac{\sin \left(x \sqrt{a^2+n^2}\right)}{\sqrt{a^2+n^2}}=\frac{1}{2} \pi  J_0(a x)-\frac{\sin (a x)}{2 a},\ \ \sum _{n=1}^{\infty } \frac{\cos \left(x \sqrt{a^2+n^2}\right)}{\sqrt{a^2+n^2}}=-\frac{1}{2} \pi  Y_0(a x)-\frac{\cos (a x)}{2 a}$$

But how to established the harder one

$$\small\sum _{n=1}^{\infty } \frac{\sin \left(x \sqrt{a^2+n^2}\right)}{\left(a^2+n^2\right)^{3/2}}=-\frac{\sin (a x)}{2 a^3}+\frac{\pi  x \coth (\pi  a)}{2 a}+\frac{1}{4} \pi ^2 x^2 (\pmb{H}_1(a x) J_0(a x)-\pmb{H}_0(a x) J_1(a x))-\frac{1}{2} \pi  x^2 J_0(a x)+\frac{\pi  x J_1(a x)}{2 a}$$

Here $J, \pmb{H}$ denotes Bessel and Struve functions.

Update: By M-L theorem and repeated integration one have

$$\small \sum _{n=1}^{\infty } \frac{\cos \left(x \sqrt{a^2+n^2}\right)}{\left(a^2+n^2\right)^2}=-\frac{\cos (a x)}{2 a^4}+\frac{\pi  \coth (\pi  a)}{4 a^3}+\frac{1}{8} \pi ^2 x^3 \left(1-\frac{1}{a^2 x^2}\right) F(a x)+\frac{\pi ^2 \text{csch}^2(\pi  a)}{4 a^2}+\frac{1}{4} \pi  x^3 J_0(a x)-\frac{\pi  x^2 \coth (\pi  a)}{4 a}-\frac{\pi  x^2 J_1(a x)}{4 a}$$

Where $F(t)=\pmb{H}_0(t) J_1(t)-\pmb{H}_1(t) J_0(t)$. Analytic continuation allows us to extend the range to $|a|<1$, $x\in (0,2\pi)$, for instance

$$\small\sum _{n=1}^{\infty } \frac{\cos \left(\sqrt{4 n^2-1}\right)}{\left(n^2-\frac{1}{4}\right)^2}=2 \pi ^2 \pmb{L}_1(1) I_0(1)-2 \pi ^2 \pmb{L}_0(1) I_1(1)+\pi ^2-8 \cosh (1)+2 \pi  I_0(1)-2 \pi  I_1(1)$$

Moreover, differentiating closed-form of $\sum _{n=1}^{\infty } \left(\frac{\sin \left(x \sqrt{a^2+n^2}\right)}{\sqrt{a^2+n^2}}-\frac{\sin (n x)}{n}\right)$ w.r.t $x$ yields:

$$\small\sum _{n=1}^{\infty } \left(\cos \left(\pi  \sqrt{n^2+1}\right)-(-1)^n\right)=1-\frac{\pi  J_1(\pi )}{2}$$

 [/INST] Using the representation
\begin{equation}
\frac{\sin \left(x \sqrt{a^2+n^2}\right)}{\left(a^2+n^2\right)^{3/2}}=x\int_0^1 \frac{\cos \left(tx \sqrt{a^2+n^2}\right)}{a^2+n^2}\,dt\\
\end{equation} 
and integrating by parts,
\begin{equation}
\frac{\sin \left(x \sqrt{a^2+n^2}\right)}{\left(a^2+n^2\right)^{3/2}}=x\frac{\cos \left(x \sqrt{a^2+n^2}\right)}{a^2+n^2}+x^2\int_0^1 t\frac{\sin \left(tx \sqrt{a^2+n^2}\right)}{\sqrt{a^2+n^2}}\,dt
\end{equation} 
We have then to evaluate
\begin{align}
S(x)&=\sum_{n\ge1}\frac{\sin \left(x \sqrt{a^2+n^2}\right)}{\left(a^2+n^2\right)^{3/2}}\\
&=xA(x)+x^2B(x)\\
A(x)&=\sum_{n\ge1}\frac{\cos \left(x \sqrt{a^2+n^2}\right)}{a^2+n^2}\\
B(x)&=\sum_{n\ge1}\int_0^1 t\frac{\sin \left(tx \sqrt{a^2+n^2}\right)}{\sqrt{a^2+n^2}}\,dt
\end{align} 
We have
\begin{align}
A'(x)&=-\sum_{n\ge1}\frac{\sin \left(x \sqrt{a^2+n^2}\right)}{\sqrt{a^2+n^2}}\\
&=-\frac{1}{2} \pi  J_0(a x)+\frac{\sin (a x)}{2 a}
\end{align} 
And thus, considering that
\begin{equation}
A(0)=\sum_{n\ge1}\frac{1}{n^2+a^2}=\frac{\pi}{2a}\coth \pi a-\frac{1}{2a^2}
\end{equation} 
we deduce
\begin{align}
&A(x)=\frac{\pi}{2a}\coth \pi a-\frac{1}{2a^2}+\int_0^x\left[\frac{\sin (a t)}{2 a}-\frac{1}{2} \pi  J_0(a t)\right]\,dt\\
&=\frac{\pi}{2a}\coth \pi a-\frac{1}{2a^2}+\frac{x\pi^2}{4}\left( \pmb{H}_1(a x) J_0(a x)-\pmb{H}_0(a x) J_1(a x) \right)-\frac{x\pi}{2}J_0(ax)+\frac{1-\cos ax}{2a^2}
\end{align} 
Now,
\begin{align}
B(x)&=\int_0^1 \left[\frac{1}{2} \pi  J_0(a xt)-\frac{\sin (a xt)}{2 a}\right]t\,dt\\
&=\frac{1}{x^2}\int_0^x\left[\frac{1}{2} \pi  J_0(a u)-\frac{\sin (a u)}{2 a}\right]u\,du\\
&=\frac{\pi }{2ax}J_1(ax)+\frac{\cos ax}{2xa^2}-\frac{\sin xa}{2x^2a^3}\\
\end{align} 
Finally, as expected,
\begin{align}
S(x)=&\frac{\pi x}{2a}\coth \pi a-\frac{x}{2a^2}+\frac{x^2\pi^2}{4}\left( \pmb{H}_1(a x) J_0(a x)-\pmb{H}_0(a x) J_1(a x) \right)-\frac{x^2\pi}{2}J_0(ax)\\
&+\frac{x}{2a^2}+
\frac{x\pi }{2a}J_1(ax)-\frac{\sin ax}{2a^3}
\end{align} 
The series with cosines could be evaluated in the same way. In fact working directly with complex numbers $\exp\left(i x\sqrt{n^2+a^2} \right)$ and Hankel functions may simplify, but I didn't try. Indefinite integrals of $H_0^{1}(z)$ and $zH_0^{1}(z)$ are indeed tabulated DLMF.
</s>