# A transformation formula for the digamma function

I derived an astonishing relationship that includes the digamma function:\begin{align}\upsilon(x,a)&=\gamma+\psi(1-aix)-\frac{a\pi}2\operatorname{csch}^2a\pi x+\frac{i\pi}{e^{2a\pi x}-1}-\frac1{x(e^{2a\pi x}-1)}\\[2ex] &\quad+\sum_{k\ge1}\frac xk\bigg(\frac1{(x+k)(e^{2a\pi(x+k)}-1)}-\frac1{(k-x)(e^{2a\pi(k-x)}-1)}\bigg)\\[4ex] &=-\gamma-\psi(1-x)-\frac\pi{2a}\csc^2\pi x+\frac{i\pi}{e^{2i\pi x}-1}-\frac i{ax(e^{2i\pi x}-1)}\\[2ex] &\quad-ai\sum_{k\ge1}\frac xk\bigg(\frac1{(aix+k)(e^{2k\pi/a+2i\pi x}-1)}-\frac1{(k-aix)(e^{2k\pi/a-2i\pi x}-1)}\bigg) \end{align}This formulation looks of the modular type, and reminds me of Ramanujan's series reformulations. Can anyone confirm if he had derived anything similar (or even identical)?

I'm going to post my derivation as an accompanying answer; it uses partial fraction decomposition to reformulate$$S(x,y,a):=\sum_{k\in\mathbb Z} \bigg(\frac1{x-y+k}-\frac1{x+k}\bigg)\frac1{e^{2a\pi(k+x)}-1}$$

• Beware–the answer contains at least five pages' worth of calculations. – Antonio DJC Jun 19 '18 at 6:00

I'll elaborate here on how I got my derivation: the formula$$\frac1{e^{2a\pi x}-1}=\frac1{2a\pi x}-\frac12+\frac1\pi\sum_{k\ge1}\frac{ax}{k^2+a^2x^2}$$allows me to re-evaluate $S(x,y,a)$ as\begin{align}&\sum_{k\in\mathbb Z}\frac y{(k+x)(x-y+k)}\bigg(\frac1{2a\pi(k+x)}-\frac12+\frac1\pi\sum_{n\ge1}\frac{a(k+x)}{n^2+a^2(k+x)^2}\bigg)\\[2ex] &=\sum_{k\in\mathbb Z}\bigg(\frac y{2a\pi(k+x)^2(x-y+k)}-\frac y2\cdot\frac1{(k+x)(k+x-y)}+\sum_{n\ge1}\frac{ay/\pi}{(k+x-y)(n^2+a^2(k+x)^2)}\bigg)\\[2ex] &=\frac1{2a\pi}\sum_{k\in\mathbb Z}\bigg(\frac1{(k+x)(k+x-y)}-\frac1{(k+x)^2}\bigg)-\frac y2\sum_{k\in\mathbb Z}\frac1{(k+x)(x-y+k)}\\[2ex] &\quad+\sum_{k\in\mathbb Z,\,n\ge1}\frac{y/(a\pi)}{2in/a(k+x-y)}\bigg(\frac1{k+x-in/a}-\frac1{k+x+in/a}\bigg)\\[2ex] &=\bigg(\frac1{2a\pi}-\frac y2\bigg)\sum_{k\in\mathbb Z}\frac1{(k+x)(k+x-y)}-\frac\pi{2a}\csc^2\pi x\\[2ex] &\quad+\frac y{2i\pi}\sum_{n\ge1}\frac1n\sum_{k\in\mathbb Z}\bigg(\frac1{(k+x-y)(k+x-in/a)}-\frac1{(k+x-y)(k+x+in/a)}\bigg). \end{align}I now have three sums of the form$$T(x;y,z)=\sum_{k\in\mathbb Z}\frac1{(k+x+y)(k+x+z)}$$to evaluate; I'll split the sums over negative- and positive-indexed terms and for $k=0$:\begin{align}T(x;y,z)&=\frac1{(x+y)(x+z)}+\sum_{k\ge1}\bigg(\frac1{(x+y+k)(x+z+k)}+\frac1{(x+y-k)(x+z-k)}\bigg)\\[2ex] &=\frac1{(x+y)(x+z)}+\frac1{z-y}\sum_{k\ge1}\bigg(\frac1{x+y+k}-\frac1{x+z+k}+\frac1{x+y-k}-\frac1{x+z-k}\bigg)\\[2ex] &=\frac1{(x+y)(x+z)}+\frac1{z-y}\sum_{k\ge1}\bigg(\frac{2(x+y)}{(x+y)^2-k^2}-\frac{2(x+z)}{(x+z)^2-k^2}\bigg)\\[2ex] &=\frac1{(x+y)(x+z)}-\frac1{z-y}\sum_{k\ge1}\bigg(\frac{2(x+y)}{(ix+iy)^2+k^2}-\frac{2(x+z)}{(ix+iz)^2+k^2}\bigg)\\[2ex] &=\frac1{(x+y)(x+z)}\\[1ex] &\quad+\frac{2i\pi}{z-y}\bigg[\frac1{e^{2i\pi(x+y)}-1}-\frac1{2i\pi(x+y)}+\frac12-\frac1{e^{2i\pi(x+z)}-1}+\frac1{2i\pi(x+z)}-\frac12\bigg]\\[2ex] &=\frac1{(x+y)(x+z)}+\frac1{z-y}\frac{x+y-x-z}{(x+y)(x+z)}+\frac{2i\pi}{z-y}\bigg[\frac1{e^{2i\pi(x+y)}-1}-\frac1{e^{2i\pi(x+z)}-1}\bigg]\\[4ex] &=\frac{2i\pi}{z-y}\bigg[\frac1{e^{2i\pi(x+y)}-1}-\frac1{e^{2i\pi(x+z)}-1}\bigg] \end{align}Now I can finish evaluating $S(x,y,a)$!\begin{align}S(x,y,a)&=\bigg(\frac1{2a\pi}-\frac y2\bigg)\cdot\frac{2i\pi}y\bigg[\frac1{e^{2i\pi(x-y)}-1}-\frac1{e^{2i\pi x}-1}\bigg]-\frac\pi{2a}\csc^2\pi x\\[2ex] &\quad+\frac y{2i\pi}\sum_{n\ge1}\frac1n\bigg(\frac{2i\pi}{y-in/a}\bigg[\frac1{e^{2i\pi(x-y)}-1}-\frac1{e^{2i\pi(x-in/a)}-1}\bigg]\qquad\qquad\qquad-\frac{2i\pi}{y+in/a}\bigg[\frac1{e^{2i\pi(x-y)}-1}-\frac1{e^{2i\pi(x+in/a)}-1}\bigg]\bigg)\\[3ex] &=\bigg(\frac i{ay}-i\pi\bigg)\bigg[\frac1{e^{2i\pi(x-y)}-1}-\frac1{e^{2i\pi x}-1}\bigg]-\frac\pi{2a}\csc^2\pi x\\[2ex] &\quad+\sum_{n\ge1}\bigg(\frac y{n(y-in/a)}\bigg[\frac1{e^{2i\pi(x-y)}-1}-\frac1{e^{2i\pi(x-in/a)}-1}\bigg]-\frac y{n(y+in/a)}\bigg[\frac1{e^{2i\pi(x-y)}-1}-\frac1{e^{2i\pi(x+in/a)}-1}\bigg]\bigg)\\[3ex] &=\bigg(\frac i{ay}-i\pi\bigg)\bigg[\frac1{e^{2i\pi(x-y)}-1}-\frac1{e^{2i\pi x}-1}\bigg]-\frac\pi{2a}\csc^2\pi x\\[2ex] &\quad+\frac1{e^{2i\pi(x-y)}-1}\sum_{n\ge1}\frac yn\frac{2in/a}{y^2+n^2/a^2}\\[2ex] &\quad-\sum_{n\ge1}\frac y{n(y-in/a)}\frac1{e^{2i\pi x+2n\pi/a}-1}+\sum_{n\ge1}\frac y{n(y+in/a)}\frac1{e^{2i\pi x-2n\pi/a}-1}\\[2ex] &=-\frac\pi{2a}\csc^2\pi x+\bigg(\frac i{ay}-i\pi\bigg)\bigg[\frac1{e^{2i\pi(x-y)}-1}-\frac1{e^{2i\pi x}-1}\bigg]+\frac1{e^{2i\pi(x-y)}-1}\sum_{n\ge1}\frac{2aiy}{a^2y^2+n^2}\\[2ex] &\quad-\sum_{n\ge1}\frac y{n(y-in/a)}\frac1{e^{2i\pi x+2n\pi/a}-1}+\sum_{n\ge1}\frac y{n(y+in/a)}\bigg(-1-\frac1{e^{2n\pi/a-2i\pi x}-1}\bigg)\\[2ex] &=-\frac\pi{2a}\csc^2\pi x+aiy\sum_{n\ge1}\frac1{n(n-aiy)}\\[2ex] &\quad+\bigg(\frac i{ay}-i\pi\bigg)\bigg[\frac1{e^{2i\pi(x-y)}-1}-\frac1{e^{2i\pi x}-1}\bigg]+\frac{2i\pi}{e^{2i\pi(x-y)}-1}\bigg(\frac1{e^{2a\pi y}-1}-\frac1{2a\pi y}+\frac12\bigg)\\[2ex] &\quad-\sum_{n\ge1}\frac y{n(y-in/a)}\frac1{e^{2i\pi x+2n\pi/a}-1}-\sum_{n\ge1}\frac y{n(y+in/a)}\frac1{e^{2n\pi/a-2i\pi x}-1}\\[3ex] &=-\frac\pi{2a}\csc^2\pi x-\gamma-\psi(1-aiy)-\bigg(\frac i{ay}-i\pi\bigg)\frac1{e^{2i\pi x}-1}+\frac{2i\pi}{(e^{2a\pi y}-1)(e^{2i\pi(x-y)}-1)}\\[2ex] &\quad-ai\sum_{n\ge1}\frac y{n(n+aiy)}\frac1{e^{2i\pi x+2n\pi/a}-1}+ai\sum_{n\ge1}\frac y{n(n-aiy)}\frac1{e^{2n\pi/a-2i\pi x}-1}.\tag{*} \end{align}And from my original definition,\begin{align}S(x,y,a)&=\bigg(\frac1{x-y}-\frac1x\bigg)\frac1{e^{2a\pi x}-1}\\[2ex] &\quad+\sum_{k\ge1}\bigg[\bigg(\frac1{x-y+k}-\frac1{x+k}\bigg)\frac1{e^{2a\pi(k+x)}-1}\bigg]\\[2ex] &\quad+\sum_{k\ge1}\bigg[\bigg(\frac1{x-y-k}-\frac1{x-k}\bigg)\frac1{e^{2a\pi(-k+x)}-1}\bigg]\\[3ex] &=\bigg(\frac1{x-y}-\frac1x\bigg)\frac1{e^{2a\pi x}-1}\\[2ex] &\quad+\sum_{k\ge1}\bigg[\bigg(\frac1{x-y+k}-\frac1{x+k}\bigg)\frac1{e^{2a\pi(k+x)}-1}\bigg]\\[2ex] &\quad+\sum_{k\ge1}\bigg[\bigg(\frac1{x-y-k}-\frac1{x-k}\bigg)\bigg(-1-\frac1{e^{2a\pi(k-x)}-1}\bigg)\bigg]\\[3ex] &=\frac y{x(x-y)}\frac1{e^{2a\pi x}-1}+\sum_{k\ge1}\bigg(\frac1{k-x+y}-\frac1k+\frac1k-\frac1{k-x}\bigg)\\[2ex] &\quad+\sum_{k\ge1}\bigg[\frac y{(x+k)(x-y+k)}\frac1{e^{2a\pi(k+x)}-1}\bigg]\\[2ex] &\quad-y\sum_{k\ge1}\bigg[\frac1{(x-y-k)(x-k)}\frac1{e^{2a\pi(k-x)}-1}\bigg]\\[3ex] &=\frac y{x(x-y)}\frac1{e^{2a\pi x}-1}+\psi(1-x)-\psi(1+y-x)\\[2ex] &\quad+\sum_{k\ge1}\bigg[\frac y{(x+k)(x-y+k)}\frac1{e^{2a\pi(k+x)}-1}\bigg]\\[2ex] &\quad-y\sum_{k\ge1}\bigg[\frac1{(k+y-x)(k-x)}\frac1{e^{2a\pi(k-x)}-1}\bigg] \end{align}so now I'll set $y=x$ and take a limit for the singular terms:\begin{align}\lim_{y\to x}\bigg[S(x,y,a)-\frac1{x-y}\frac1{e^{2a\pi x}-1}\!\bigg]\!&=\frac{-1}{x(e^{2a\pi x}-1)}+\psi(1-x)-\psi(1)+\sum_{k\ge1}\bigg(\frac x{(x+k)k}\frac1{e^{2a\pi(k+x)}-1}\!-\!\frac x{k(k-x)}\frac1{e^{2a\pi(k+x)}-1}\bigg)\\[1ex] &=\frac{-1}{x(e^{2a\pi x}-1)}+\psi(1-x)+\gamma+\sum_{k\ge1}\bigg(\frac x{k(x+k)}\frac1{e^{2a\pi(k+x)}-1}\!+\!\frac x{k(x-k)}\frac1{e^{2a\pi(k+x)}-1}\bigg) \end{align}Now I employ the equation $(*)$ for $S(x,y,a)$:\begin{align}\lim_{y\to x}&\bigg[-\!\frac\pi{2a}\csc^2\pi x-\gamma-\psi(1-aiy)\\[2ex] &\quad-\!\bigg(\frac i{ay}-i\pi\bigg)\frac1{e^{2i\pi x}-1}-\frac1{x-y}\frac1{e^{2a\pi x}-1}+\frac{2i\pi}{(e^{2a\pi y}-1)(e^{2i\pi(x-y)}-1)}\\[2ex] &\quad-ai\sum_{n\ge1}\frac y{n(n+aiy)}\frac1{e^{2i\pi x+2n\pi/a}-1}+ai\sum_{n\ge1}\frac y{n(n-aiy)}\frac1{e^{2n\pi/a-2i\pi x}-1}\bigg]\\[2ex] &=-\frac\pi{2a}\csc^2\pi x-\gamma-\psi(1-aix)-\bigg(\frac i{ax}-i\pi\bigg)\frac1{e^{2i\pi x}-1}\\[2ex] &\quad-\sum_{n\ge1}\frac{aix}{n(n+aix)}\frac1{e^{2i\pi x+2n\pi/a}-1}+\sum_{n\ge1}\frac{aix}{n(n-aix)}\frac1{e^{2n\pi/a-2i\pi x}-1}\\[2ex] &\quad+\lim_{y\to x}\bigg[\frac1{y-x}\frac1{e^{2a\pi x}-1}+\frac{2i\pi}{e^{2a\pi y}-1}\bigg(\frac1{2i\pi(x-y)}-\frac12+\frac1\pi\sum_{k\ge1}\frac{i(x-y)}{k^2-(x-y)^2}\bigg)\bigg]\\[2ex] &=-\frac\pi{2a}\csc^2\pi x-\gamma-\psi(1-aix)-\bigg(\frac i{ax}-i\pi\bigg)\frac1{e^{2i\pi x}-1}-\frac{i\pi}{e^{2a\pi x}-1}\\[2ex] &\quad+\lim_{y\to x}\frac{e^{2a\pi y}-e^{2a\pi x}}{(y-x)(e^{2a\pi x}-1)(e^{2a\pi y}-1)}\\[2ex] &\quad-\sum_{n\ge1}\frac{aix}{n(n+aix)}\frac1{e^{2i\pi x+2n\pi/a}-1}+\sum_{n\ge1}\frac{aix}{n(n-aix)}\frac1{e^{2n\pi/a-2i\pi x}-1}\\[2ex] &=-\frac\pi{2a}\csc^2\pi x-\gamma-\psi(1-aix)-\!\bigg(\frac i{ax}-i\pi\bigg)\frac1{e^{2i\pi x}-1}-\frac{i\pi}{e^{2a\pi x}-1}+\frac{2a\pi e^{2a\pi x}}{(e^{2a\pi x}-1)^2}\\[2ex] &\quad-\sum_{n\ge1}\frac{aix}{n(n+aix)}\frac1{e^{2i\pi x+2n\pi/a}-1}+\sum_{n\ge1}\frac{aix}{n(n-aix)}\frac1{e^{2n\pi/a-2i\pi x}-1} \end{align}and my transformation formula results after a few rearrangements.
I noticed that if I instead set $x=0$, I'll obtain a simpler formula with a similar property:\begin{align}S(0,y,a)&=\bigg(\bigg[\frac1{x-y}-\frac1x\bigg]\frac1{e^{2a\pi x}-1}\bigg)_{x\to0}\\[2ex] &\quad+\sum_{k\ge1}\bigg(\bigg[\frac1{k-y}-\frac1k\bigg]\frac1{e^{2ak\pi}-1}+\bigg[\frac1{-k-y}+\frac1k\bigg]\frac1{e^{-2ak\pi}-1}\bigg)\\[2ex] &=\bigg(\bigg[\frac1{x-y}-\frac1x\bigg]\frac1{e^{2a\pi x}-1}\bigg)_{x\to0}\\[2ex] &\quad+\sum_{k\ge1}\bigg(\bigg[\frac1{k-y}-\frac1k\bigg]\frac1{e^{2ak\pi}-1}+\bigg[\frac1k-\frac1{k+y}\bigg]\bigg[-1-\frac1{e^{2ak\pi}-1}\bigg]\bigg)\\[4ex] &=\bigg(\bigg[\frac1{x-y}-\frac1x\bigg]\bigg[\frac1{2a\pi x}-\frac12+\frac1\pi\sum_{k\ge1}\frac{ax}{k^2+a^2x^2}\bigg]\bigg)_{x\to0}\\[2ex] &\quad+\sum_{k\ge1}\bigg(\bigg[\frac1{k-y}-\frac1k\bigg]\frac1{e^{2ak\pi}-1}+\bigg[\frac1k-\frac1{k+y}\bigg]\bigg[-1-\frac1{e^{2ak\pi}-1}\bigg]\bigg)\\[4ex] &=-\frac1y\bigg(-\frac12+\frac1\pi\sum_{k\ge1}\frac0{k^2}\bigg)+\bigg[-\frac1{2a\pi x^2}+\frac1{2x}-\frac a\pi\sum_{k\ge1}\frac1{k^2+a^2x^2}+\frac1{2a\pi x(x-y)}\bigg]_{x\to0}\\[2ex] &\quad+\sum_{k\ge1}\bigg(\frac y{k(k-y)}\frac1{e^{2ak\pi}-1}-\frac y{k(k+y)}\frac1{e^{2ak\pi}-1}-\frac y{k(k+y)}\bigg)\\[4ex] &=\frac1{2y}-\frac{a\pi}6-\gamma-\psi(1+y)+\bigg[\frac1{2x}+\frac1{2a\pi y}\bigg(\frac1{x-y}-\frac1x\bigg)\!-\!\frac1{2a\pi x^2}\bigg]_{x\to0}\\[2ex] &\quad+\sum_{k\ge1}\bigg(\frac y{k(k-y)}\frac1{e^{2ak\pi}-1}-\frac y{k(k+y)}\frac1{e^{2ak\pi}-1}\bigg).\tag1 \end{align}Substituting into $(*)$,\begin{align}S(0,y,a)&=-\gamma-\psi(1-aiy)-\bigg[\frac\pi{2a}\csc^2\pi x+\bigg(\frac i{ay}-i\pi\bigg)\frac1{e^{2i\pi x}-1}-\frac{2i\pi}{(e^{2a\pi y}-1)(e^{2i\pi(x-y)}-1)}\bigg]_{x\to0}\\[2ex] &\quad-ai\sum_{n\ge1}\frac y{n(n+aiy)}\frac1{e^{2n\pi/a}-1}+ai\sum_{n\ge1}\frac y{n(n-aiy)}\frac1{e^{2n\pi/a}-1}\\[2ex] &=-\gamma-\psi(1-aiy)-\sum_{n\ge1}\frac{aiy}{n(n+aiy)}\frac1{e^{2n\pi/a}-1}+\sum_{n\ge1}\frac{aiy}{n(n-aiy)}\frac1{e^{2n\pi/a}-1}\\[2ex] &\quad+\frac{2i\pi}{(e^{2a\pi y}-1)(e^{-2i\pi y}-1)}-\bigg\{\frac1{2a\pi}\bigg[\frac1{x^2}+\sum_{k\ge1}\bigg(\frac1{(k+x)^2}+\frac1{(x-k)^2}\bigg)\bigg]+\bigg(\frac i{ay}-i\pi\bigg)\bigg[\frac1{2i\pi x}-\frac12+\frac1\pi\sum_{k\ge1}\frac{ix}{k^2-x^2}\bigg]\bigg\}_{x\to0}\\[4ex] &=-\gamma-\psi(1-aiy)-\sum_{n\ge1}\frac{aiy}{n(n+aiy)}\frac1{e^{2n\pi/a}-1}+\sum_{n\ge1}\frac{aiy}{n(n-aiy)}\frac1{e^{2n\pi/a}-1}\\[2ex] &\quad+\frac{2i\pi}{(e^{2a\pi y}-1)(e^{-2i\pi y}-1)}-\frac\pi{6a}+\frac i{2ay}-\frac{i\pi}2-\bigg\{\frac1{2a\pi x^2}+\frac1{2a\pi xy}-\frac1{2x}\bigg\}_{x\to0}\tag2 \end{align}The singular parts in $(1)$ and $(2)$ match and can be eliminated.
Now I set \begin{align}u_1(y,a):&=\frac1{2y}\!-\!\frac{a\pi}6\!-\!\gamma\!-\psi(1+y)-\frac1{2a\pi y^2}\!+\sum_{k\ge1}\bigg(\frac y{k(k-y)}\frac1{e^{2ak\pi}-1}-\frac y{k(k+y)}\frac1{e^{2ak\pi}-1}\bigg), \end{align}$$u_2(y,a):=-\gamma-\psi(1-aiy) +\frac{2i\pi}{(e^{2a\pi y}-1)(e^{-2i\pi y}-1)}-\frac\pi{6a}+\frac i{2ay}-\frac{i\pi}2-\sum_{n\ge1}\frac{aiy}{n(n+aiy)}\frac1{e^{2n\pi/a}-1}+\sum_{n\ge1}\frac{aiy}{n(n-aiy)}\frac1{e^{2n\pi/a}-1};$$change $a$ to $1/a$ in $u_1$:\begin{align}u_1(y,1/a):&=\frac1{2y}\!-\!\frac\pi{6a}\!-\!\gamma\!-\psi(1+y)-\frac a{2\pi y^2}\!+\sum_{k\ge1}\bigg(\frac y{k(k-y)}\frac1{e^{2k\pi/a}-1}-\frac y{k(k+y)}\frac1{e^{2k\pi/a}-1}\bigg), \end{align}now scale $y$ by $ai$:\begin{align}u_1(aiy,1/a):\!&=-\frac i{2ay}\!-\!\frac\pi{6a}\!-\!\gamma\!-\psi(1+aiy)+\frac 1{2a\pi y^2}\\[1ex] &\quad+\sum_{k\ge1}\bigg(\frac {aiy}{k(k-aiy)}\frac1{e^{2k\pi/a}-1}-\frac {aiy}{k(k+aiy)}\frac1{e^{2k\pi/a}-1}\bigg)\\[3ex] &=u_2(y,a)+\gamma+\psi(1-aiy) -\frac{2i\pi}{(e^{2a\pi y}-1)(e^{-2i\pi y}-1)}+\frac\pi{6a}-\frac i{2ay}+\frac{i\pi}2. \end{align}Since $u_2=u_1$, it follows that $u_1$ has a modular-like identity; also,\begin{align}\frac1{2y}\!&-\!\frac{a\pi}6\!-\!\gamma\!-\psi(1+y)-\frac1{2a\pi y^2}\!+\sum_{k\ge1}\bigg(\frac y{k(k-y)}\frac1{e^{2ak\pi}-1}-\frac y{k(k+y)}\frac1{e^{2ak\pi}-1}\bigg)\\[3ex] &=\frac1{2y}\!-\!\frac{a\pi}6\!-\!\gamma\!-\psi(1+y)-\frac1{2a\pi y^2}\!+\sum_{k\ge1}\frac{2y^2}{k(k^2-y^2)}\frac1{e^{2ak\pi}-1}\tag3\\[6ex] &=-\gamma-\psi(1-aiy) +\frac{2i\pi}{(e^{2a\pi y}-1)(e^{-2i\pi y}-1)}\\[2ex] &\quad-\frac\pi{6a}\!+\!\frac i{2ay}-\frac{i\pi}2-\sum_{n\ge1}\frac{-2a^2y^2}{n(n^2+a^2y^2)}\frac1{e^{2n\pi/a}-1}\\[5ex] &=-\gamma-\psi(1-aiy)-\frac{2i\pi}{(e^{2a\pi y}-1)}\bigg(1+\frac1{e^{2i\pi y}-1}\bigg)\\[2ex] &\quad-\frac{i\pi}2-\frac\pi{6a}+\frac i{2ay}-2a^2y^2\sum_{k\ge1}\frac1{k(k^2+a^2y^2)(e^{2k\pi/a}-1)}\tag4, \end{align}and by uniting $(3)$ and $(4)$, I get a digamma scaling formula. I'm certain the singularities at $y=0$ can be removed using partial fraction decomposition.