I add more details for the solution in the distinguished answer due to Anixx. First, we need the digamma function
http://en.wikipedia.org/wiki/Digamma_function
which we will call $\Psi(x)$. Important properties (from that web page) are: $\Psi(x)$ is analytic in the complex plane except at the nonpositive integers where it has simple poles. $\Psi(x+1)-\Psi(x) = 1/x$. $\Psi(x) > 0$ for $x>2$. Asymptotics:
$$
\Psi(x) = \log x - \frac{1}{2x} - \frac{1}{12x^2} + \frac{1}{120x^4} + O(x^{-6})
\qquad\text{as } x \to \infty .
$$
So, define $T(z) ={}$
$$
-\sum_{k = 1}^{\infty} \Biggl[\Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) - z + 1\Biggr) + \Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) + z\Biggr) - \Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) + 1\Biggr) -
\Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr)\Biggr)\Biggr]
$$
For any fixed $z$, only finitely many preliminary terms involve $\Psi$ evaluated at a nonpositive argument, and the asymptotics of the remaining terms are computed (from the asymptotics given above) as
$$
\Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) - z + 1\Biggr) + \Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) + z\Biggr) - \Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) + 1\Biggr) -
\Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr)\Biggr)
$$
$=z(1-z)/(k^2\pi^2)$ as $k \to \infty$. So the series converges absolutely except when we are at a pole of one of the preliminary terms. Now, because of absolute convergence, we may subtract term-by-term and simplify to get
$$ T(z+1)-T(z) = \sum_{k=1}^\infty\Biggl[\frac{8z}{(\pi+2\pi k-2z)(\pi+2\pi k+2z)}\Biggr] = \tan z . $$