I'm curios as to what method(s) could be used for evaluating the series $$S=\frac{h}{x^2+h^2}+\sum_{k=1}^{\infty}h\left(\frac{1}{\left(2kd+x\right)^2+h^2}+\frac{1}{\left(2kd-x\right)^2+h^2}\right)?$$
From Mathematica, I know that the answer is
$$S=\frac{\pi}{4d}\left( \coth\left[\frac{\pi \left(h+ix\right)}{2d}\right]+ \coth\left[\frac{\pi \left(h-ix\right)}{2d}\right]\right),$$
but the result baffled me so much that I wanted to know more about how to arrive at this by hand.
Elementary approaches (which I would have a higher chance of understanding), if they are applicable, would be preferred, but any method is welcomed! :)
Thanks!