The identity
$$\pi \cot(\pi z) = \frac{1}{z}+\lim_{N\to \infty}\sum_{|n| \le N}\frac{1}{z+n}=\frac{1}{z}+\sum_{n =1}^{\infty}\frac{2z}{z^2-n^2}$$
which you state for real $t$ is old, and in some sense was known to Euler. It holds for all complex numbers $z$ which are not integers.

A full proof is given in in pages 142-144 of Stein and Shakarchi's "Complex analysis" (Princeton Lectures in Analysis, 2003), with references to 4 other proofs. They use this identity to give a rigorous proof for Euler's product formula for $\sin(\pi z)$, namely $\sin(\pi z)= \pi z\prod_{n \ge 1}(1-z^2/n^2)$.