I am trying to prove this relation, which I think can only be evaluated via contour integration: $$ \int_{-\infty}^{\infty}dk\;e^{ikx}\frac{k\sinh\left[k(y-\frac{w}{2})\right]}{\cosh\left(\frac{kw}{2}\right)}=\frac{\pi^{2}}{w^{2}}Re\left[\frac{\cosh[\frac{\pi}{w}(x+iy)]}{\sinh^{2}[\frac{\pi}{w}(x+iy)]}\right] $$ This is equation 18 (see also below Eq 16) in the paper "Linking Spatial Distributions of Potential and Current in Viscous Electronics" (arXiv PDF).
Any help will be highly appreciated.
Let $U=\{u\in\mathbb{C} : |\Re u|<1\}$, $u\in U$, and consider $$I_R=\int_{C_R}\frac{e^{uz}\,dz}{\sinh z},$$ where $R>0$, and $C_R$ is the rectangular contour (closed, ccw-oriented) with vertices at $z=\pm R\pm\pi i/2$. By the residue theorem, it is equal to $2\pi i$ times the residue of the integrand at $z=0$: $I_R=2\pi i$. On the other hand, with $R\to\infty$, the integrals over vertical sides vanish, and we have $$\lim_{R\to\infty}I_R=\int_{-\infty}^{\infty}\left(\frac{\exp[u(t-\pi i/2)]}{\sinh(t-\pi i/2)}-\frac{\exp[u(t+\pi i/2)]}{\sinh(t+\pi i/2)}\right)\,dt=2i\cos\frac{\pi u}{2}\int_{-\infty}^{\infty}\frac{e^{ut}\,dt}{\cosh t}.$$ Thus, $\int_{-\infty}^{\infty}\frac{e^{ut}\,dt}{\cosh t}=\frac{\pi}{\cos(\pi u/2)}$. Now take the derivative w.r.t. $u$ (which is admissible under the integral sign too), put $u=1+2i(x+iy)/w$ and substitute $t=wk/2$.
(You may happen to know the last integral already; it is related to the $\mathrm{B}$-function.)