I just wanted to add this answer only to show the Pole expansion derivation for $\csc(z)$. So from what I've learned about it, the Mittag-Leffler expansion (which is how we get the pole expansion for all poles $(n+\frac{1}{2})\pi$) is the sum of all the principal parts of all possible Laurent Series of $f(z)$.
Using the fact that $\tag{1}\sec(z) = -\csc(z-\frac{\pi}{2})$ we can actually instead start with writing out all the principal parts of $\frac{1}{\sin(z)}$. This function has all of it's poles centered at $n\pi$ and all possible Laurent Series can be expressed by simply plugging in $n\pi$ into a normal Laurent Series. Doing so would give:
$$\frac{1}{z-n\pi}\frac{z-n\pi}{\sin(z)} =\frac{1}{z-n\pi}\frac{z-n\pi}{T_{n\pi}(\sin(z))} =\frac{1}{z-n\pi} \frac{z-n\pi}{\Big\{0+(-1)^n(z-n\pi)--0+-\frac{(-1)^n}{6}(z-n\pi)^3-0+\frac{(-1)^n}{120}(z-n\pi)^5--0+....\Big\}}$$
And performing long division and then multiplying the series yields the Laurent Series about all poles $n\pi$: $$\frac{1}{\sin(z)} = (-1)^n\{\boxed{...+0(z-n\pi)^{-3}+0(z-n\pi)^{-2}+1(z-n\pi)^{-1}}+0(z-n\pi)^{0}+\frac{1}{6}(z-n\pi)^{1}+0(z-n\pi)^{2}+\frac{7}{360}(z-n\pi)^{3}+...\}$$
And lastly we want all the principal parts which I have boxed and these are going to be the negative power pole terms only ($(z-n\pi)^{n<0}$), and thankfully we only have one nonzero term $\frac{(-1)^n}{z-n\pi}$, so our Mittag-Leffler expansion representation of $f(z)$ (which again, is the sum of all the principal parts which make up all possible Laurent series), is:
$$\tag{2}\frac{1}{\sin(z)} = \sum_{n=-\infty}^\infty \frac{(-1)^n}{z-n\pi}$$
And now we just have to use (1) from earlier and rewrite (2):
$$\tag{3}\frac{1}{\cos(z)} = -\sum_{n=-\infty}^\infty \frac{(-1)^n}{(z-\frac{\pi}{2})-n\pi}$$
And split up the sum such that $\sum_{-N}^N a_n = \sum_{n=0}^N a_n + \sum_{n=0}^{N-1}a_{-n-1} \approx \sum_{n=0}^N a_n + \sum_{n=0}^{N}a_{-n-1} \text{ for } N\rightarrow \infty$ to get:
$$\frac{1}{\cos(z)} = \sum_{0}^\infty \frac{(-1)^{n+1}}{(z-\frac{\pi}{2})-n\pi} + \frac{(-1)^{-n-1+1}}{(z-\frac{\pi}{2})-(-n-1)\pi}
\\ =\sum_{0}^\infty (-1)^{n+1}\Big(\frac{1}{z-\frac{\pi}{2}-n\pi} + \frac{-1}{z+\frac{\pi}{2}+n\pi}\Big) \\ = \sum_{n=0}^\infty (-1)^n\frac{(2n+1)\pi}{(n+\frac{1}{2})^2\pi^2-z^2}$$
And finally $\cos(iz) = \cosh(z)$ and therefore:
$$\tag{4} \frac{1}{\cosh(z)} = \sum_{n=0}^\infty (-1)^n\frac{(2n+1)\pi}{(n+\frac{1}{2})^2\pi^2+z^2}$$
Now that we have an alternate way of representing our pesky hyperbolic trig function inside of our sum:
$$\tag{5} u(1/2,1/2) = \frac{1}{4}\sum_{n=0}^\infty \frac{(-1)^n}{2n+1}\frac{1}{\sinh((n+\frac{1}{2})\pi)}$$
by plugging in (4) into (5) after changing our iteration variable to k and substitution of z:
$$\tag{6} u(1/2,1/2) = \frac{1}{4}\sum_{n=0}^\infty \frac{(-1)^n}{2n+1}\sum_{k=0}^\infty (-1)^k\frac{(2k+1)\pi}{(k+\frac{1}{2})^2\pi^2+(n+\frac{1}{2})^2\pi^2}$$
And from here it should be fairly simple what to do next, being combine the sums $\sum_n a_n \sum_k a_k = \sum_n\sum_k a_n a_k$, factor out $\pi$, and the tricky part would be to keep a mental note of this sum and compare it to what it looks like after performing a partial fraction expansion. After that it become clear what happens next.
Starting with combining everything and noting that $a^n(b+c)^n = (ab+ac)^n$:
$$\tag{7} \boxed{S = \frac{1}{\pi}\sum_{n=0}^\infty \sum_{k=0}^\infty \frac{2k+1}{2n+1}\frac{(-1)^{n+k}}{(2k+1)^2+(2n+1)^2}}$$
Partial fraction expansion of $\frac{A}{B(A^2+B^2)} = \frac{1}{AB}-\frac{B}{A(A^2+B^2)}$ and splitting up $\sum_n\sum_k \frac{1}{AB}-\frac{B}{A(A^2+B^2)}$ into two sums yields:
$$S = \frac{1}{\pi}\tag{8}\sum_{n=0}^\infty\sum_{k=0}^\infty \frac{(-1)^{n+k}}{(2n+1)(2k+1)} - \boxed{\frac{1}{\pi}\sum_{n=0}^\infty \sum_{k=0}^\infty \frac{2k+1}{2n+1}\frac{(-1)^{n+k}}{(2k+1)^2+(2n+1)^2}}$$
Notice how the boxed term is exactly the same as (7), so if we were to substitute this sum with S as Stefan Lafon suggested in their solution, we would get:
$$ S = \frac{1}{\pi}\sum_{n=0}^\infty\frac{(-1)^n}{2n+1}\sum_{k=0}^\infty\frac{(-1)^k}{2k+1} - S \\ 2S = \frac{1}{\pi} \arctan(1)^2 \\ S = \frac{1}{2\pi}\Big(\frac{\pi}{4}\Big)^2 = \frac{\pi}{32}$$
And therefore we can say that:
$$u(1/2,1/2) = \frac{1}{4}\sum_{n=0}^\infty \frac{(-1)^n}{2n+1}\frac{1}{\sinh\big((n+1/2)\pi\big)} = \frac{\pi}{32}$$
So it looks like the trick with dealing with hyperbolic trig functions (at least in this example) is by... not evaluating them, we basically cancel out and get rid of it.
If by chance you came to this question trying to evaluate the solution to a PDE (partial differential equation, specifically Poisson's Equation) like I did, I recommend heading to THIS QUESTION, it might prove useful.