Proof for a infinite series representation of $\tan(x)$?

The Mittag-Leffler theorem from complex variables in what you need. The only problem with your formula is that it's not clear how a doubly-infinite series should be evaluated. I presume you intend something like $$\tan{z}=\lim_{k\to\infty}\sum_{n=-k}^{k}\frac{-1}{x+\pi n + \frac{\pi}{2}}.$$ However, the usually convention is that both the "positive series" and the "negative series" must converge for the sum to be well-defined, and I don't think that's true in this case.

This is just a technical cavil, however. I'm really impressed that you found the series.

If you look at the formula for $\tan{z}$ in the link, you'll see the grouped the term for the pole at ${(2k+1)\pi\over2}$ with the term for the pole at ${-(2k+1)\pi\over2}$, to get an ordinary series.


FYI,

$\sum\limits_{n=-\infty}^{\infty}\dfrac{-1}{x+\pi n + \frac{\pi}{2}}=\sum\limits_{n=1}^{\infty}\dfrac{-1}{x+\pi n + \frac{\pi}{2}}+\sum\limits_{n=1}^{\infty}\dfrac{-1}{x-\pi n + \frac{\pi}{2}}-\dfrac{1}{\frac{x}{\pi}+\frac{1}{2}}\tag1$

$\dfrac{1}{\pi}\Big[\sum\limits_{n=1}^{\infty}\dfrac{-1}{\frac{x}{\pi}+\frac{1}{2} +n }+\sum\limits_{n=1}^{\infty}\dfrac{1}{-(\frac{x}{\pi}+\frac{1}{2}) +n }-\dfrac{1}{\frac{x}{\pi}+\frac{1}{2}}\Big]=\tag2$

Using the following identity refer to Digamma function: $\psi(z+1)=-\gamma +\sum\limits_{n=1}^\infty \Big(\frac{1}{n}-\frac{1}{n+z}\Big)$

$ \dfrac{1}{\pi}\Big[{\psi(1+\frac{x}{\pi}+\frac{1}{2})-\psi(1-\frac{x}{\pi}-\frac{1}{2})-\frac{1}{\frac{x}{\pi}+\frac{1}{2}}}\Big]\tag3$

Applying that $\psi(z+1)=\psi(z)+\frac{1}{z}$ and the reflexion formula of Digamma function $\psi(1-z)-\psi(z)=\pi\cot(\pi z)$ we get:

$\dfrac{1}{\pi}\Big[\psi(\frac{x}{\pi}+\frac{1}{2})-\psi(1-\frac{x}{\pi}-\frac{1}{2})\Big]=-\cot(x+\frac{\pi}{2})=\tan(x)\tag4$