A series expansion for $\cot (\pi z)$