I am looking at the convergence of the series
$$ \cos(t\theta) = \frac{\sin(\pi t)}{\pi} \cdot \Bigg[\frac{1}{t} + 2t \sum_{k=1}^\infty (-1)^k \frac{\cos(k\theta)}{t^2 - k^2}\Bigg].$$

Here $t\in\mathbb{R}$. The above equality is rather trivial, but the convergence of the right side towards the left side is not straightforward to me. Based on empirical observations, we have convergence to the target function if $|\theta| <\pi$, regardless of $t$ (even if $t\in\mathbb{Z}$, by taking the limit). If $|\theta|>\pi$, we still have convergence, but towards a different function rather than $\cos(t\theta)$.

Is that correct? How to prove it or find the conditions on $\theta,t$ for the convergence to $\cos(t \theta)$?

**Purpose**

This was part of a bigger project to find an analytic continuation of $\zeta^*(s)$ where $\zeta^*(s) = \zeta(s)$ if $\Re(s)$ is an integer. The hope was that the analytic continuation would coincide with $\zeta(s)$. You may replace $\zeta,\zeta^*$ by the Dirichlet eta function or related functions. You could do the same using $\Im(s)$ instead of $\Re(s)$. 

The first step is establish the following and check when it is valid, for an arbitrary even function $f(t)$:

$$ f(t) = \frac{\sin(\pi t)}{\pi} \cdot \Bigg[\frac{f(0)}{t} + \phi'(t)\sum_{k=1}^\infty (-1)^k \frac{f(k)}{\phi(t) - \phi(k)}\Bigg].$$
Here I used $\phi(t)=t^2$. Then have a similar formula for odd functions, and by combining both, a formula for any function regardless of parity.

I  did get some pretty decent approximation (analytic extension) when working with $\Re(s)$ fixed and $t$ is the variable. But not an exact continuation. However, it does not lead to anything interesting, even if the approximation  was exact. It's less accurate anyway as $t$ increases. 

What I really wanted is the same thing but with $\Im(s)$ fixed instead, and $\sigma$ playing the role of $t$. There I failed; it would have been an exciting development otherwise. I am not finished yet, as there are plenty of options for $\phi(t)$, not just $\phi(t)=t^2$. I tried many low-hanging fruits; all failed. There has to be some $\phi$ that will work, I guess, though it won't be a simple function. You could choose $\phi$ by solving an integral equation in $\phi$ so that the RHS matches the LHS. Anyway, that's where I am now. Not sure if I will pursue the idea.