$\newcommand{\d}{\,\mathrm{d}}$Contour methods allow for a principal value transformation into a different integral. This isn't exactly efficient, but I enjoyed working it through.
First map $x\mapsto x/a$ - then it suffices to show that: $$I:=\int_0^\infty\frac{x}{\cosh x}\d x=2G$$
Consider the contour $\gamma_{\rho,\varepsilon}$ which runs from $0\to\rho$, $\rho\to\rho+i\pi,\rho+i\pi\to i\pi$ and then on the journey $i\pi\to0$ we take a small semicircular indent at $\frac{i\pi}{2}$, where the indent is specifically the map $C_\varepsilon:[-\pi/2,\pi/2]\to\Bbb C$, $t\mapsto\frac{i\pi}{2}+\varepsilon e^{-it}$, not enclosing the pole at $\frac{i\pi}{2}$.
The integral on the small strip $\rho\to\rho+i\pi$ asymptotically vanishes: $$\begin{align}\left|i\int_0^\pi\frac{\rho+it}{e^\rho e^{it}+e^{-\rho}e^{-it}}\d t\right|&\lt2(\rho+\pi)\int_0^{\pi/2}|(e^\rho+e^{-\rho})\cos t+(e^\rho-e^{-\rho})i\sin(t)|^{-1}\d t\\&=2(\rho+\pi)\int_0^{\pi/2}\frac{1}{\sqrt{(e^\rho+e^{-\rho})^2+2\cos(2t)}}\d t\\&\lt2(\rho+\pi)\frac{\pi}{2}\frac{1}{e^\rho-e^{-\rho}}\\&=2\pi\cdot\frac{\rho+\pi}{\sinh\rho}\overset{\rho\to\infty}{\longrightarrow}0\end{align}$$
When we return $\rho+i\pi\to i\pi$, there is a negative effect due to $e^{i\pi}$ which balances out the negative from running "the opposite way", with contribution: $$\int_0^\rho\frac{i\pi}{e^x+e^{-x}}\d x+I_\rho$$
The integral on $C_\varepsilon$ is rather like the half-residue theorem, since the pole is simple: $$\int_{C_\varepsilon}\sim-\frac{1}{2}\int_{-\pi/2}^{\pi/2}(i\pi/2+\varepsilon e^{-it})\d t\sim-\frac{i\pi^2}{2}$$As $\varepsilon\to0^+$. For the non-indented section ($z=it$): $$\frac{1}{2}\left(\int_0^{\pi/2-\varepsilon}+\int_{\pi/2+\varepsilon}^\pi\right)t\sec t\d t\sim0-2\int_0^{\pi/2}\ln(\sec t+\tan t)\d t$$Bringing it all together and taking limits: $$2\int_0^\infty\frac{x}{e^x+e^{-x}}\d x+\frac{1}{2}\cdot\operatorname{pv}\int_0^\pi t\sec t\d t-\frac{i\pi^2}{2}+i\pi[\arctan\tanh(x/2)]_0^\infty=0$$So: $$\int_0^\infty\frac{x}{\cosh x}\d x=-\frac{1}{2}\cdot\operatorname{pv}\int_0^\pi t\sec t\d t=\int_0^{\pi/2}\ln(\sec t+\tan t)\d t$$
And the last is known to be $2G$.