$$i \int_{0}^{\infty}\frac{f(a+iy)}{e^{2\pi y}e^{-2\pi ia}-1}-\frac{f(a-iy)}{e^{2\pi y}e^{2\pi ia}-1}dy \\
=i\sum_{k=0}^{M}\frac{f^{(k)}(a)}{k!}\int_{0}^{\infty}(\frac{(i)^ky^k}{e^{2\pi y}e^{-2\pi ia}-1}-\frac{(-i)^ky^k}{e^{2\pi y}e^{2\pi ia}-1})dy\\
=i\sum_{k=0}^{M}\frac{f^{(k)}(a)}{k!}\int_{0}^{\infty}(\frac{(i)^ky^ke^{-2\pi y}e^{2\pi ia}}{1-e^{-2\pi y}e^{2\pi ia}}-\frac{(-i)^ky^ke^{-2\pi y}e^{-2\pi ia}}{1-e^{-2\pi y}e^{-2\pi ia}})dy\\
=i\sum_{k=0}^{M}\frac{f^{(k)}(a)}{k!}\int_{0}^{\infty}(\sum_{n=1}^{\infty}(i)^ky^ke^{-2\pi ny}e^{2\pi ian}-(-i)^ky^ke^{-2\pi ny}e^{-2\pi ian})dy \ \ \ \ \ \ \ \ \ (2\pi ny=t)\\
=i\sum_{k=0}^{M}\frac{f^{(k)}(a)}{k!}\int_{0}^{\infty}(\sum_{n=1}^{\infty}\frac{e^{2\pi ian}}{(2\pi n)^{k+1}}(i)^kt^ke^{-t}-\frac{e^{-2\pi ian}}{(2\pi n)^{k+1}}(-i)^kt^ke^{-t})dt\\
=i\sum_{k=0}^{M}\frac{f^{(k)}(a)}{k!}(\sum_{n=1}^{\infty}\frac{e^{2\pi ian}}{(2\pi n)^{k+1}}(i)^kk!-\frac{e^{-2\pi ian}}{(2\pi n)^{k+1}}(-i)^kk!)\\
\\
=\sum_{k=0}^{M}\frac{f^{(k)}(a)}{k!}(\sum_{n=1}^{\infty}\frac{e^{2\pi ian+\frac{2\pi i(k+1)}{4}}}{(2\pi n)^{k+1}}k!+ \frac{e^{-2\pi ian-\frac{2\pi i(k+1)}{4}}}{(2\pi n)^{k+1}}k!)\\
=\sum_{k=0}^{M}\frac{f^{(k)}(a)}{k!}\sum_{n=1}^{\infty}\frac{2\cos({2\pi an+\frac{2\pi (k+1)}{4}})}{(2\pi n)^{k+1}}k!\\
=\sum_{k=0}^{M}\frac{f^{(k)}(a)}{(k+1)!}\sum_{n=1}^{\infty}\frac{2\cos({2\pi (-a)n-\frac{2\pi (k+1)}{4}})}{(2\pi n)^{k+1}}(k+1)!\\
=-\sum_{k=0}^{M}\frac{f^{(k)}(a)}{(k+1)!} \widehat{B}_{k+1}(-a) \ \ \ (0< a<1 なら)\\
=-\sum_{k=0}^{M}\frac{f^{(k)}(a)}{(k+1)!}B_{k+1}(1-a)\\
=\sum_{k=0}^{M}\frac{(-1)^kf^{(k)}(a)}{(k+1)!}B_{k+1}(a)$$
以上より
$$i \int_{0}^{\infty}\frac{f(a+iy)}{e^{2\pi y}e^{-2\pi ia}-1}-\frac{f(a-iy)}{e^{2\pi y}e^{2\pi ia}-1}-\frac{f(b+iy)}{e^{2\pi y}e^{-2\pi ib}-1}+\frac{f(b-iy)}{e^{2\pi y}e^{2\pi ib}-1}dy\\ =-\sum_{k=0}^{M}\frac{1}{(k+1)!}(f^{(k)}(a)\widehat{B}_{k+1}(-a)-f^{(k)}(b)\widehat{B}_{k+1}(-b))$$
補足
$M$は多項式$f(x)$の次数
$\widehat{B}_{k}(x)$は周期ベルヌーイ多項式