Here I want to get the closed form solution of the following summation
$$ \sum_{n=1}^\infty \frac{\sin\sqrt{n^2+1}}{\sqrt{n^2+1}} \qquad(1) $$
Or the more general form ($x$ be an arbitrary real number, and $a\geq0$ is a constant):
$$ f_a(x) = \sum_{n=1}^\infty \frac{\sin\left(x\sqrt{n^2+a^2}\right)}{\sqrt{n^2+a^2}}\qquad(2) $$
I tried the numeircal simulations before I post the question. I truncated the first $1,000,000$ terms of equation (1) and it turned $0.781233190560320$.
Anyone can help me?
In fact, I made it the reduced case when $a=0$. It can be proved by Fourier series: $$ f_0(x)=\sum_{n=1}^\infty \frac{\sin nx}{n} = \left\{ \matrix{\dfrac{\pi-x}{2}, 0<x<2\pi\\0, x=0,2\pi} \right. $$ And the function is periodical: $$ f_0(x) = f_0(x+2\pi) $$
Edit: How about this one? $$ g_a(x) = \sum_{n=1}^\infty \frac{\cos\left(x\sqrt{n^2+a^2}\right)}{\sqrt{n^2+a^2}}\qquad(3) $$
We get the "diverging wave solution" in physics when we combine the equation (2) and (3): $$ h_a(x)=g_a(x)+\text{i}f_a(x)=\sum_{n=1}^\infty \frac{\exp\left(\text{i}x\sqrt{n^2+a^2}\right)}{\sqrt{n^2+a^2}}\qquad(4) $$
Edit #2: I tested the solution solved by Random Variable (see the most ranked answer and thousands thanks to it!) compared with the truncating results:
$$ \sum_{n=1}^N\frac{\sin \left(x\sqrt{n^2+a^2}\right)}{\sqrt{n^2+a^2}}, N = 1,000,000, a=1 $$
Here is the solution by @Random Variable: the solution of equation (2) as the following:
$$ \sum_{n={1}}^\infty \frac{\sin\left(x\sqrt{n^2+a^2}\right)}{\sqrt{n^2+a^2}} = \frac{\pi}{2} J_0(ax) -\frac{\sin(ax)}{2a}, a>0, 0<x<2\pi\qquad(2*) $$ where $J_0(ax)$ is the Bessel function of the first kind of order zero.
It can be found that the both agree well when $0 <x<2\pi$,but differ in other domain. So, how about the solution beyond $(0,2\pi)$?
Edit #3:
Inspired by Random Variable's answer, I found the solution of equation (3) as the following:
$$ \sum_{n={1}}^\infty \frac{\cos\left(x\sqrt{n^2+a^2}\right)}{\sqrt{n^2+a^2}} = -\frac{\pi}{2} Y_0(ax) -\frac{\cos(ax)}{2a}, a>0, 0<x<2\pi\qquad(3*) $$ where $Y_0(ax)$ is the Bessel function of the second kind of order zero.
Here is the comparison:
Note that equation (3) is divergent when $x=0$.
Possible relating QUESTIONS:


UPDATE:
To apply the Abel-Plana formula, the behavior of $f(z)$ as $\Re (z) \to + \infty$ is also important. This was omitted from my answer.
A sufficient condition, now stated here, is $f(z) \sim O(e^{2\pi|\Im z|}/|z|^{1+\epsilon}) $ as $\Re(z) \to +\infty$.
The function $\frac{\sin \left( x\sqrt{z^{2}+a^{2}}\right)}{\sqrt{z^{2}+a^{2}}} $ does not satisfy this condition.
But as achille hui explains in the linked answer, this condition is about ensuring that $\lim_{b\to\infty} f(b) = 0$ and $$\lim_{b\to\infty}\int_0^\infty \frac{f(b+it)-f(b-it)}{e^{2\pi t} - 1}dt = 0. $$
I've asked achille hui to post an answer to show that the limit of the above integral is indeed going to zero.
We can use the the Abel-Plana formula as stated in achille hui's answer here.
First notice that the singularities of $f(z) = \frac{\sin \left( x\sqrt{z^{2}+a^{2}}\right)}{\sqrt{z^{2}+a^{2}}}$ are removable.
Also, for $x>0$, $\left|\sin \left( x\sqrt{z^{2}+a^{2}}\right)\right| \sim \frac{e^{x\left|\Im (z)\right|}}{2} $as $\Im(z) \to \pm \infty$.
So if $0 < x < 2 \pi$, the conditions of the Abel-Plana formula are satisfied, and we get $$\begin{align} \sum_{{\color{red}{n=0}}}^{\infty} \frac{\sin \left( x\sqrt{n^{2}+a^{2}}\right)}{\sqrt{n^{2}+a^{2}}} &= \int_{0}^{\infty} \frac{\sin \left( x\sqrt{t^{2}+a^{2}}\right)}{\sqrt{t^{2}+a^{2}}} \, dt + \frac{1}{2} f(0) + i (0) \\ &= \int_{0}^{\infty} \frac{\sin \left( x\sqrt{t^{2}+a^{2}}\right)}{\sqrt{t^{2}+a^{2}}} \, dt + \frac{\sin (ax)}{2a}. \end{align}$$
But from this answer, we know that $$\int_{0}^{\infty} \frac{\sin \left( x\sqrt{t^{2}+a^{2}}\right)}{\sqrt{t^{2}+a^{2}}} \, dt = \frac{\pi}{2} J_{0}(ax), \quad (a>0, \ x>0), \tag{1}$$ where $J_{0}(x)$ is the Bessel function of the first kind of order zero.
(To see that $(1)$ is related to the Mehler–Sonine integral representation of the Bessel function of the first kind, you only need to make the initial substitution in that answer).
Therefore, $$\sum_{{\color{red}{n=0}}}^{\infty} \frac{\sin \left( x\sqrt{n^{2}+a^{2}}\right)}{\sqrt{n^{2}+a^{2}}} = \frac{\pi}{2} J_{0}(ax) + \frac{\sin (ax)}{2a}, \quad (a>0, \ 0<x < 2 \pi).$$
To recover the $a=0$ case, pull out the $n=0$ term and take the limit on both sides of the equation as $a \to 0^{+}$.
It should be noted that the series converges by Dirichlet's test since $$\sin \left( x\sqrt{t^{2}+a^{2}}\right) \sim \sin(tx) + \mathcal{O} \left(\frac{1}{t} \right)$$ as $t \to \infty$, which can be shown by expanding $\sqrt{t^{2}+a^{2}} = t \sqrt{1+ \frac{a^{2}}{t^{2}}}$ at $t= \infty$ and using the trig identity for $\sin(\alpha +\beta)$.