A folklore result I have seen used in evaluations of infinite sums is the following clever use of the residue theorem:
$$\begin{align*}\sum_{1}^\infty f(k)&=\frac1{2\pi i}\oint f(z)\pi\cot\pi z\,\mathrm dz\\\sum_{1}^\infty (-1)^k f(k)&=\frac1{2\pi i}\oint f(z)\pi\csc\pi z\,\mathrm dz\end{align*}$$
where $f(z)$ is analytic and the contour surrounds the appropriate subset of poles.
I have seen some references ascribe this to Mittag-Leffler, but as far as I aware, his only contribution was showing that the functions used in the contour integrals above can be decomposed into their poles.
The fact that these results do not have a name attached to them makes it hard to search for more information; my limited searching shows me that these results are often quoted in handbooks or textbooks as a mere consequence of the residue theorem.
So I must ask: is there any history behind these summation formulae (who came up with it, first appearance in the literature, etc.)? References where I can read more on this and other contour integral summation techniques (e.g. I have seen the variants that use tangent, secant, or even the gamma function itself) are welcome.