Prove that $ \sum\limits_{n=-\infty}^\infty\frac{\cos\pi\sqrt{n^2+1}}{3+4n^2}=\int\limits_{-\infty}^\infty\frac{\cos\pi\sqrt{x^2+1}}{3+4x^2}dx $? How one can prove that the infinite sum of this function equals its integral
$$
\sum_{n=-\infty}^\infty\frac{\cos\pi\sqrt{n^2+1}}{3+4n^2}=\int_{-\infty}^\infty\frac{\cos\pi\sqrt{x^2+1}}{3+4x^2}dx\ ? \tag{1}
$$ 
My analysis: Mathematica wasn't able to return any closed form for the integral or the sum. Then I checked this relation by numerical computations and it agreed to about 20 decimal places.
I know from this question Sum equals integral that the function $\text{sinc}\ x=\frac{\sin x}{x}$ has the same property
$$
\int_{-\infty}^{+\infty} {\rm sinc}\, x \, dx = \sum_{n = -\infty}^{+\infty} {\rm sinc}\, n = \pi
$$
I tried to find a closed form for the integral $(1)$ but couldn't.
Motivation: I was challenged by a friend to prove this relation. I'm curious how one can prove it?
Note: There has been a suggestion to straightforwardly apply Euler-MacLauren summation formula to prove this statement. Though I don't know why it can not be applied in this case, I checked numerically whether the sum equals the integral for the similar looking functions $f_1(x)=\frac{\cos\pi\sqrt{x^2+1}}{1+x^2}$ and $f_2(x)=\frac{\cos\pi\sqrt{x^2+1}}{2+x^2}$, but in both cases there was a difference of about 1% between the sum and the integral. In starck contrast to this, using the same algorithm for $\frac{\cos\pi\sqrt{x^2+1}}{3+4x^2}$ there wasn't any difference between the sum and the integral at least to 20 decimal places. So I think it is very unlikely that 1% error can be attributed to computational error. 
 A: For any positive $a$, define
$$f_a(x) =\frac{\cos\pi\sqrt{x^2+1}}{x^2+a^2}$$
What you have observed is caused by the equality
$$\sum_{n=-\infty}^\infty f_a(n) - \int_{-\infty}^\infty f_a(x) dx =
\frac{2\pi}{a(e^{2\pi a} - 1)}\times
\begin{cases}
\cosh\pi\sqrt{a^2-1}, & a > 1\\
\\
\cos\pi\sqrt{1-a^2},  & a < 1
\end{cases}
\tag{*1}
$$
and the fact $$\cos\pi\sqrt{1-a^2} = \cos\frac{\pi}{2} = 0\quad\text{ when } a^2 = \frac34$$
To see why $(*1)$ is true, we use the fact $f_a(n)$ is an even function in $n$ to rewrite LHS of $(*1)$ as
$$2 \left[\sum_{n=0}^\infty f_a(n) - \left(\int_0^\infty f_a(x) dx + \frac12 f_a(0)\right)\right]$$
This is similar to what you will find in
the Abel-Plana formula${}^{\color{blue}{[1]}}$,

For any function $f(z)$ which is
  
  
*
  
*continuous on $\Re z \ge 0$ and analytic on $\Re z > 0$
  
*$f(z) \sim o(e^{2\pi|\Im z|} )$ as $\Im z \to \pm \infty$, uniformly with respect to $\Re z$.
  
*$f(z) \sim O(e^{2\pi|\Im z|}/|z|^{1+\epsilon})$ as $\Re z \to +\infty$ ${}^{\color{blue}{[2]}}$.
  
  
  we have
$$\sum_{n=0}^\infty f(n) = \int_0^\infty f(x) dx + \frac12 f(0) + i \int_0^\infty \frac{f(it) - f(-it)}{e^{2\pi t}-1} dt\tag{*2}$$

However, $f_a(x)$ doesn't exactly satisfy the condition above. It has two
poles at $\pm a i$. After a little bit of tweaking of the contour used in the proof of the Abel-Plana formula, one find:
$$\text{LHS}(*1) = 2i \lim_{\epsilon\to 0^{+}} \int_0^\infty \frac{f_a(it+\epsilon) - f_a(-it+\epsilon)}{e^{2\pi t} - 1} dt$$
For $t \ne a$, since $f_a(z)$ is even, the two pieces in $f_a(it+\epsilon) - f_a(-it+\epsilon)$ cancels out as $\epsilon \to 0^{+}$.
For $t \approx a$, the two pieces can be combined to a integral of $\frac{f(it)}{e^{2\pi t}-1}$ over a circle centered at $a$.
As a result, RHS reduces to
$$(2i)(2\pi i)\text{Res}_{t = a}\left[\frac{\cos\pi\sqrt{1-t^2}}{(a^2 - t^2)(e^{2\pi t} - 1)}\right]
= \frac{2\pi}{a(e^{2\pi a}-1)}\times\begin{cases}
\cosh\pi\sqrt{a^2-1}, & a > 1\\
\\
\cos\pi\sqrt{1-a^2}, & a < 1
\end{cases}
$$
Back to the special case $a^2 = \frac{3}{4}$ which corresponds to the equality in question. 
When $a^2 = \frac{3}{4}$, the "pole" of $f_a(z)$ at $z = \pm a i$ become removable singularities. The original version of Abel-Plana formula in $(*2)$ applies. Since $f_a(x)$ is even, last integral in $(*2)$ vanishes and the equality follows. This explain why the sum equal to the integral for  $\frac{\cos\pi\sqrt{x^2+1}}{3+4x^2}$ but not other similar looking integrand like $\frac{\cos\pi\sqrt{x^2+1}}{1+x^2}$ or $\frac{\cos\pi\sqrt{x^2+1}}{2+x^2}$. 
Notes


*

*$\color{blue}{[1]}$ For more details of Abel-Plana formula and its derivation, please refer to $\S 8.3$ of Frank W. J Olver's book: Asymptotics and Special Functions. 

*$\color{blue}{[2]}$ In order to convert the AP formula on finite sum in Olver's book to infinite sum here, I have added a condition $(3)$ for this particular problem. The whole purpose of that is to force following limits to zero.
$$\lim\limits_{b\to\infty} f(b) = 0\quad\text{ and }\quad\lim\limits_{b\to\infty}\int_0^\infty \frac{f(b+it)-f(b-it)}{e^{2\pi t} - 1}dt = 0$$
For other $f(z)$, if one can justifies these limits, we can forget condition $(3)$ and the AP formula remains valid.

