So I know from Mathematica that:
$$\sum_{n=0}^\infty \frac{a^2-b^2(2n+1)^2}{(a^2+b^2(2n+1)^2)^2}=-\frac{\pi^2\mathrm{sech}^2\left(\frac{a\pi}{2b}\right)}{8b^2}$$
I am wondering how someone could come up with this answer logically without having to plug it into a computer. What kind of thought processes could you follow, upon seeing the sum on the left, to try and get a closed form expression?
As Semiclassical noted, you look at $$ \sum_{n=0}^\infty \dfrac{r^2 - (2n+1)^2}{(r^2 + (2n+1)^2)^2} $$
Expand the summand in partial fractions: $$ \dfrac{r^2 - (2n+1)^2}{(r^2 + (2n+1)^2)^2} ={\frac {2 {r}^{2}}{ \left( r^2 + (2n+1)^2 \right) ^{2}}} - \dfrac{1}{ r^2 + (2n+1)^2 }$$
First deal with the term on the right:
$$ F(r) = \sum_{n=0}^\infty \dfrac{1}{r^2 + (2n+1)^2}$$
Let $$G(r) = \sum_{k=1}^\infty \dfrac{1}{r^2 + k^2} $$ so that $F(r)$ consists of the terms of $G(r)$ for odd $k$. But since $$\dfrac{1}{r^2 + (2n)^2} = \dfrac{1}{4} \dfrac{1}{(r/2)^2 + n^2}$$ we have $$G(r) = F(r) + \dfrac{1}{4} G(r/2)$$ Now it is a ``well-known'' identity that $$ \pi \cot(\pi z) = \dfrac{1}{z} + \sum_{n=1}^\infty \dfrac{2z}{z^2 - n^2} = \dfrac{1}{z} - 2 z G(iz) $$ and this leads to
$$ F(r) = \dfrac{\pi \coth(\pi r)}{2r} - \dfrac{\pi \coth(\pi r/2)}{4r} $$ which can be simplified to $$ F(r) = \dfrac{\pi \tanh(\pi r/2)}{4r}$$ Now note that $$\dfrac{d}{dr} \dfrac{1}{r^2 + (2n+1)^2} = \dfrac{-2r}{\left(r^2+(2n+1)^2\right)^2}$$ so your sum is $$ - \dfrac{\pi \tanh(\pi r/2)}{4r} - r \dfrac{d}{dr} \dfrac{\pi \tanh(\pi r/2)}{4r}$$ which should simplify to $$ - \dfrac{\pi^2 \text{sech}^2(\pi r/2)}{8} $$