Sum the series $\sum_{n = 1}^{\infty}\{\coth (n\pi x) + x^{2}\coth(n\pi/x)\}/n^{3}$ This sum is from Ramanujan's letters to G. H. Hardy and Ramanujan gives the summation formula as
\begin{align} &\frac{1}{1^{3}}\left(\coth \pi x + x^{2}\coth\frac{\pi}{x}\right) + \frac{1}{2^{3}}\left(\coth 2\pi x + x^{2}\coth\frac{2\pi}{x}\right) \notag\\
&\, \, \, \, \, \, \, \, + \frac{1}{3^{3}}\left(\coth 3\pi x + x^{2}\coth\frac{3\pi}{x}\right) + \cdots\notag\\
&\, \, \, \, \, \, \, \, = \frac{\pi^{3}}{90x}(x^{4} + 5x^{2} + 1)\notag
\end{align}
Since $$\coth x = \frac{e^{x} + e^{-x}}{e^{x} - e^{-x}} = \frac{1 + e^{-2x}}{1 - e^{-2x}} = 1 + 2\frac{e^{-2x}}{1 - e^{-2x}}$$the above sum is transformed into $$(1 + x^{2})\sum_{n = 1}^{\infty}\frac{1}{n^{3}} + 2\sum_{n = 1}^{\infty}\frac{e^{-2n\pi x}}{n^{3}(1 - e^{-2n\pi x})} + 2x^{2}\sum_{n = 1}^{\infty}\frac{e^{-2n\pi/x}}{n^{3}(1 - e^{-2n\pi/x})}$$ If we put $q = e^{-\pi x}$ we get sums like $\sum q^{2n}/\{n^{3}(1 - q^{2n})\}$ which I don't know how to sum.
It seems I am going on a wrong track. Please provide some alternative approach.
Update: All the answers given below so far use complex analyis (transforms and residues) to evaluate the sum. I am almost certain that Ramanujan did not evaluate the sum using complex analysis. Perhaps the method by Ramanujan is more like the one explained in this question. Do we have any approach based on real-analysis only?

Yet another approach using contour integration is to integrate the function $$f(z) = \frac{\pi \cot (\pi z) \coth (\pi x z)}{z^{3}} $$ around a circle centered at the origin that avoids the poles on the real and imaginary axes.
If we let the radius of the circle go to infinity discretely, the integral will vanish.
So summing the residues,  we get $$2 \sum_{n=1}^{\infty} \frac{\coth (n \pi x)}{n^{3}} +  \sum_{n=1}^{\infty} \frac{\cot (\frac{in \pi}{x})}{x(\frac{in}{x})^{3}} + \sum_{n=1}^{\infty} \frac{\cot (-\frac{i n \pi}{x})}{x (-\frac{in}{x} )^{3}} + \text{Res}[f(z),0] =  0,$$
which implies
$$\sum_{n=1}^{\infty} \frac{\coth (n \pi x)}{n^{3}} + x^{2} \sum_{n=1}^{\infty} \frac{\coth(\frac{n \pi}{x})}{n^{3}} = - \frac{1}{2} \ \text{Res} [f(z),0]. $$
Expanding at the origin, we get 
$$ \begin{align} \small f(z) &= \frac{\pi}{z^{3}}\left(\frac{1}{\pi z} - \frac{2 \zeta(2)}{\pi} z-\frac{2 \zeta(4)}{\pi} z^{3}  + \mathcal{O}(z^{5})\right) \left(\frac{1}{\pi (xz)} + \frac{2 \zeta(2)}{\pi} (xz) - \frac{2 \zeta(4)}{\pi} (xz)^{3} + \mathcal{O}(z^{5}) \right) \\ &= \frac{1}{\pi x} \frac{1}{z^{5}} + \frac{2 \zeta(2) x^{2}-2 \zeta(2)}{\pi x} \frac{1}{z^{3}}  {\color{red}{-\frac{2 \zeta(4) x^{4}+4 \zeta(2)^{2} x^{2} + 2 \zeta(4)}{\pi x}}} \frac{1}{z} + \mathcal{O}(z) .\end{align}  $$
Therefore,  $$ \sum_{n=1}^{\infty} \frac{\coth (n \pi x)}{n^{3}} + x^{2} \sum_{n=1}^{\infty} \frac{\coth(\frac{n \pi}{x})}{n^{3}} = \frac{\zeta(4) x^{4}+2 \zeta(2)^{2} x^{2} + \zeta(4)}{\pi x} =\frac{\pi^{3}}{90x} \left( x^{4}+5x^{2}+1 \right). $$
