Evaluate $\sum _{n=1}^{\infty } \sin \left(\pi \sqrt{n^2+1}\right)$ How can one prove
$$\sum _{n=1}^{\infty } \sin \left(\pi  \sqrt{n^2+1}\right)=-\frac{1}{2}\pi Y_1(\pi )-\int_0^{\infty } \exp ^{\frac{\pi}{2}  \left(t-t^{-1}\right)} (\theta(2 \pi  t)-1) \, dt$$
Here $\theta$ denotes Theta function of the third kind. Correpsonding cosine case is solved here but not so helpful. Any help will be appreciated.

We can use the Poisson summation formula after a transformation to obtain the quoted result. Defining
\begin{equation}
I(a)=\sum _{n=1}^{\infty } \sin \left(\pi  \sqrt{n^2+a^2}\right)
\end{equation} 
we have
\begin{equation}
I'(a)=\pi a\sum _{n=1}^{\infty } \frac{\cos \left(\pi  \sqrt{n^2+a^2}\right)}{\sqrt{n^2+a^2}}
\end{equation} 
For even functions, the Poisson summation formula reads
\begin{equation}
\sum _{n=1}^{\infty }f(n)=\sum _{k=1}^{\infty }\hat f(k)+\frac{1}{2}\left( \hat f(0)-f(0) \right)
\end{equation} 
where 
\begin{equation}
\hat f(k)=2\int_0^\infty f(t)\cos(2\pi kt)\,dt
\end{equation} 
Using the tabulated integral (3.876.2) in G&R, with $a>0$,
\begin{equation}
\int_0^\infty  \frac{\cos \left(\pi  \sqrt{t^2+a^2}\right)}{\sqrt{t^2+a^2}}\cos(2\pi kt)\,dt=
\begin{cases}
    K_0\left( \pi a\sqrt{4k^2-1} \right) & \text{for } k>1/4\\
   -\frac{\pi}{2}Y_0\left(\pi a  \right) & \text{for } k<1/4
  \end{cases}
\end{equation} 
Then
\begin{equation}
I'(a)=2\pi a\sum _{k=1}^{\infty } K_0\left( \pi a\sqrt{4k^2-1} \right)  -\frac{\pi^2 a}{2}Y_0\left(\pi a  \right)-\frac{\pi}{2}\cos \pi a
\end{equation} 
From here, noticing that $I(0)=0$, we can integrate by exchanging summation and integration
\begin{align}
I(s)&=2\pi  \sum _{k=1}^{\infty }\int_0^s K_0\left( \pi a\sqrt{4k^2-1} \right)a\,da  -\frac{\pi^2}{2}\int_0^s Y_0\left(\pi a  \right)a\,da-\frac{\pi}{2}\int_0^s \cos \pi a\,da\\
&=-2s\sum _{k=1}^{\infty }\frac{K_1\left( \pi s\sqrt{4k^2-1} \right)}{\sqrt{4k^2-1}}-\frac{\pi}{2}sY_1\left( \pi s \right)-\frac{1}{2}\sin \pi s
\end{align} 
We chose an integral representation for the Bessel function DLMF
\begin{equation}
K_{1}\left(z\right)=\frac{z}{4}\int_{0}^{\infty}\exp
\left(-t-\frac{z^{2}}{4t}\right)\frac{\mathrm{d}t}{t^2}
\end{equation} 
The above series reads
\begin{align}
-2s\sum _{k=1}^{\infty }\frac{K_1\left( \pi s\sqrt{4k^2-1} \right)}{\sqrt{4k^2-1}}&=-\frac{\pi s}{2}\sum _{k=1}^{\infty }\int_0^\infty e^{-t+\frac{\pi^2s^2}{4t}-\frac{\pi^2s^2k^2}{t}}\frac{\mathrm{d}t}{t^2}\\
&=-\frac{\pi s^2}{2}\int_0^\infty e^{-t+\frac{\pi^2s^2}{4t}}\left( \sum _{k=1}^{\infty }e^{-\frac{\pi^2s^2k^2}{t}} \right)\frac{\mathrm{d}t}{t^2}\\
&=-\frac{\pi s^2}{4}\int_0^\infty e^{-t+\frac{\pi^2s^2}{4t}}\left( f\left(\frac{\pi^2s^2}{t}  \right)-1 \right)\frac{\mathrm{d}t}{t^2}\\
&=-\frac{s^3}{2}\int_0^\infty e^{\frac{\pi s}{2}\left( u-\frac{ 1}{u} \right)}\left(f\left( 2\pi su \right)-1 \right)\mathrm{d}u
\end{align}
Where $f(\pi^2 a^2/t)=\theta_3(0,e^{-\pi^2 a^2/t})$ where $\theta_3$ is the Theta function of the third kind DLMF. The latter expression was obtained by changing $t=\pi s/(2u)$.
Finally,
\begin{equation}
 \sum _{n=1}^{\infty } \sin \left(\pi  \sqrt{n^2+s^2}\right)=-\frac{s^3}{2}\int_0^\infty e^{\frac{\pi s}{2}\left( u-\frac{ 1}{u} \right)}\left(f\left( 2\pi su \right)-1 \right)\mathrm{d}u-\frac{\pi}{2}sY_1\left( \pi s \right)-\frac{1}{2}\sin \pi s
\end{equation} 
which seems to be numerically correct.
