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?

Recall the well known Mittag-Leffler expansion of hyperbolic cotangent function (denote $\mathbb{W}=\mathbb{Z}/\{0\}$) :

$$\sum_{m\in\mathbb{W}}\frac{1}{m^2+z^2}=\frac{\pi\coth\pi z}{z}-\frac{1}{z^2}\tag{ML}$$

Hence, your sum is by its symmetry :
$$\begin{align}
S&=\frac{1}{2}\sum_{n \in \mathbb{W}}\{\coth (n\pi x) + x^{2}\coth(n\pi/x)\}/n^{3} \\ \\
&=\frac{1}{2\pi x}\sum_{n \in \mathbb{W}}\left(\frac{1}{n^4}+\sum_{m\in\mathbb{W}}\frac{x^2/n^2}{m^2+n^2x^2}\right)
+\left(\frac{x^4}{n^4}+\sum_{m\in\mathbb{W}}\frac{x^2/n^2}{m^2+n^2/x^2}\right)\tag{1}\\ \\
&=\frac{1}{2\pi x}\left(\zeta(4)+x^4\zeta(4)+\sum_{n,m \in \mathbb{W}^2}\frac{x^2}{n^2}\frac{1}{m^2+n^2x^2}+\frac{x^2}{n^2}\frac{1}{m^2+n^2/x^2}\right)\tag{2}\\ \\
&=\frac{1}{2\pi x}\left(2\zeta(4)+2x^4\zeta(4)+x^2\sum_{n,m\in\mathbb{W}^2}\frac{1}{n^2m^2}\frac{m^2+n^2x^2}{m^2+n^2x^2}\right)\tag{3}\\ \\
&=\frac{1}{2\pi x}\left(2\zeta(4)+2x^4\zeta(4)+4x^2\zeta^2(2)\right)\tag{4}\\ \\
&=\frac{1}{2\pi x}\left(2\frac{\pi^4}{90}+2x^4\frac{\pi^4}{90}+4x^2\frac{\pi^4}{36}\right)\tag{5}\\ \\
&=\frac{\pi^3}{90x}\left(1+x^4+5x^2\right)
\end{align}$$
Explanations
$(1)$ Use the Mittag-Leffler formula (ML) with $z=nx$ and $z=n/x$
$(2,4)$ Recall $\zeta(s)=\sum_{n=1}^{\infty}1/n^s$
$(3)$ In the second sum rename $n \longleftrightarrow m$
$(5)$ Zetas for $s=2$ and $4$ are well known, i.e. $\zeta(2)=\pi^2/6$ and $\zeta(4)=\pi^4/90$
