How to evaluate this infinite sum using Fourier series? Is there any way to solve the seris  $S=\displaystyle\sum_{n=0}^{+\infty}\frac{(-1)^n}{a^2+(2n+1)^2}$  where $a\neq 0$? 
I tried using Fourier series but I could only evaluate 
  $\displaystyle\sum_{n=0}^{+\infty}\frac{(-1)^n}{a^2+n^2}$ and $\displaystyle\sum_{n=0}^{+\infty}\frac{(-1)^n}{a^2+(2n)^2}.$
I need hints or suggestions if there are other methods.
 A: If you are able to show that 
$$ \sum_{n\geq 0}\frac{(-1)^n}{a^2+n^2} = \frac{1}{2a^2}+\frac{\pi}{2a\sinh(\pi a)} \tag{1}$$
$$ \sum_{n\geq 0}\frac{(-1)^n}{a^2+(2n)^2} = \frac{1}{2a^2}+\frac{\pi}{4a\sinh(\pi a/2)} \tag{2}$$
for instance through the Fourier sine series of $\sinh$ over $(-\pi,\pi)$, then by considering the difference between $(1)$ and $(2)$:
$$ \sum_{n\geq 0}\frac{\color{red}{1}}{a^2+(2n+1)^2} = \frac{\pi\tanh(\pi a/2)}{4a} \tag{3}$$
but if the last $\color{red}{1}$ is replaced by $(-1)^n$ the outcome is not as elementary. We have
$$ \sum_{n\geq 0}\frac{1}{(n+a)(n+b)}=\frac{\psi(a)-\psi(b)}{a-b},\qquad \psi(s)-\psi(1-s)=-\pi\cot(\pi s)\tag{4} $$
where $\psi(s)=\frac{d}{ds}\log\Gamma(s)$, hence
$$ \sum_{n\geq 0}\frac{\color{red}{(-1)^n}}{a^2+(2n+1)^2}=\frac{1}{4a}\,\text{Im}\left[\psi\left(\tfrac{1+ia}{4}\right)-\psi\left(\tfrac{3+ia}{4}\right)\right]\tag{5}$$
which essentially has a nice closed form (Catalan's constant $G$) only for $a\to 0^+$.
A: Note that the digamma function can be written as
$$
\psi(x)=-\gamma+\sum_{k=0}^\infty\left(\frac1{k+1}-\frac1{k+x}\right)\tag1
$$
where $\gamma$ is the Euler-Mascheroni constant. Thus,
$$
\begin{align}
\sum_{n=0}^\infty\frac{(-1)^n}{a^2+(2n+1)^2}
&=\frac1{2ia}\sum_{n=0}^\infty(-1)^n\left(\frac1{2n+1-ia}-\frac1{2n+1+ia}\right)\tag2\\
&=\frac1{4ia}\sum_{n=0}^\infty(-1)^n\left(\frac1{n+\frac{1-ia}2}-\frac1{n+\frac{1+ia}2}\right)\tag3\\
&=\frac1{4ia}\sum_{n=0}^\infty\left(\color{#C00}{\frac1{n+\frac{1-ia}4}-\frac1{n+\frac{1+ia}4}}\color{#090}{-\frac1{n+\frac{1-ia}2}+\frac1{n+\frac{1+ia}2}}\right)\tag4\\[6pt]
&=\frac1{4ia}\left(\psi\left(\frac{1+ia}4\right)-\psi\left(\frac{1-ia}4\right)+\psi\left(\frac{1-ia}2\right)-\psi\left(\frac{1+ia}2\right)\right)\tag5
\end{align}
$$
Explanation:
$(2)$: partial fractions
$(3)$: put $(2)$ into the form of $(1)$
$(4)$: an alternating sum is $\color{#C00}{\text{twice the even terms}}$ $\color{#090}{\text{minus all the terms}}$
$(5)$: apply $(1)$
