Prove that $\sum_{n=0}^\infty \frac{1}{(2n+1)^2}=\frac{\pi^2}{8}$ I am asked to prove that $$\sum_{n=0}^\infty \frac{1}{(2n+1)^2}=\frac{\pi^2}{8}.$$
However, I am asked to prove it using the fact that
$$\frac{\pi}{2}\tan\left(\frac{\pi}{2}z\right)=\sum_{m \text{ odd}}\left(\frac{1}{m-z}-\frac{1}{m+z}\right),$$
where $z\in \mathbb{C}$, which is something I proved in a previous exercise.
My first thought was using the fact that
$$\frac{1}{m-z}-\frac{1}{m-z}=\frac{2z}{m^2-z^2}$$
and therefore
$$\sum_{m \text{ odd}}\left(\frac{1}{m-z}-\frac{1}{m+z}\right)=\sum_{m \text{ odd}}\frac{2z}{m^2-z^2}=\sum_{n=0}^\infty \frac{2z}{(2n+1)^2-z^2}.$$
This last series is similar to the one I am aiming at, but I don't know how to transform it into the one that I want. Can someone help me?

Choose $z=\frac{a}{2}$ and take the limit as $a\rightarrow 0$.
We know that
$$
\lim_{x\rightarrow 0}\frac{\tan(x)}{x}=1,
$$
so
$$
\lim_{a\rightarrow 0}\frac{\frac{\pi}{2}\tan(\frac{\pi a}{4})}{a}=\frac{\pi^2}{8},
$$
which could be verified by L'Hospital's rule. We can replace $\tan(\frac{\pi a}{4})$ with the above summation, i.e.,
$$
\frac{\pi}{2}\tan\left(\frac{\pi a}{4}\right)=\sum_{n=0}\frac{a}{(2n+1)^2-\frac{a^2}{4}}.$$
Now, we can substitute and clean up.
$$
\begin{align}
\lim_{a\rightarrow 0}\frac{\sum_{n=0}\frac{a}{(2n+1)^2-\frac{a^2}{4}}}{a}&=\frac{\pi^2}{8}\\
\lim_{a\rightarrow 0}\sum_{n=0}\frac{1}{(2n+1)^2-\frac{a^2}{4}}&=\frac{\pi^2}{8}\\
\sum_{n=0}\lim_{a\rightarrow 0}\frac{1}{(2n+1)^2-\frac{a^2}{4}}&=\frac{\pi^2}{8}\\
\sum_{n=0}\frac{1}{(2n+1)^2}&=\frac{\pi^2}{8}
\end{align}
$$
Disclaimer: Thanks to Dan Velleman for his/her insight.
