First, we derive the alternating sum version of Abel-Plana formula, i.e
$$\sum_{k=0}^{2N} (-1)^kf(k)$$
Start with the Abel-Plana formula, Eq. 2.10.2
$$\begin{align}\sum_{k=a}^n f(k)&=\int_a^n f(x)dx+\frac{1}{2}f(a)+\frac{1}{2}f(n)-2\int_0^\infty \frac{\Im\left(f(a+iy)\right)}{e^{2\pi y}-1}dy\\ &+\sum_{s=1}^m\frac{B_{2s}}{(2s)!}f^{(2s-1)}(x)\bigg|_{x=n}+\hat{R}\end{align}\tag{0}$$
where $\hat{R}=\hat{R}(m,n)$ is the remainder term and it depends on $m , n$. Here $B_{2s}$ are Bernoulli numbers.
Set $a=0, n=2N$
$$\begin{align}\sum_{k=0}^{2N} f(k)&=\int_0^{2N} f(x)dx+\frac{1}{2}f(0)+\frac{1}{2}f(2N)-2\int_0^\infty \frac{\Im\left(f(iy)\right)}{e^{2\pi y}-1}dy\\ &+\sum_{s=1}^m\frac{B_{2s}}{(2s)!}f^{(2s-1)}(x)\bigg|_{x=2N}+\hat{R_1}\tag{1}\end{align}$$
Next, set $a=0, n=N$
$$\begin{align}\sum_{k=0}^{N} g(k)&=\int_0^{N} g(x)dx+\frac{1}{2}g(0)+\frac{1}{2}g(N)-2\int_0^\infty \frac{\Im\left(g(iy)\right)}{e^{2\pi y}-1}dy\\ &+\sum_{s=1}^m\frac{B_{2s}}{(2s)!}g^{(2s-1)}(x)\bigg|_{x=N}+\hat{R_2}\tag{2}\end{align}$$
Let $g(x)=f(2x)$, eq.(2) becomes
$$\begin{align}\sum_{k=0}^{N} f(2k)&=\color{red}{\int_0^{N} f(2x)dx}+\frac{1}{2}f(0)+\frac{1}{2}f(2N)\color{blue}{-2\int_0^\infty \frac{\Im\left(f(2iy)\right)}{e^{2\pi y}-1}dy}\\ &+\sum_{s=1}^m\frac{B_{2s}}{(2s)!}2^{2s-1}f^{(2s-1)}(x)\bigg|_{x=2N}+\hat{R_2}\tag{3}\end{align}$$
Let $t=2x, \theta=2y$
$$\color{red}{\int_0^{N} f(2x)dx}=\frac{1}2\int_0^{2N} f(t)dt,~~~~~~\color{blue}{-2\int_0^\infty \frac{\Im\left(f(2iy)\right)}{e^{2\pi y}-1}dy}=-\int_0^\infty \frac{\Im\left(f(i\theta)\right)}{e^{\pi \theta}-1}d\theta$$
So eq.(3) becomes:
$$\begin{align}\sum_{k=0}^{N} f(2k)&=\frac{1}2\int_0^{2N} f(t)dt+\frac{1}{2}f(0)+\frac{1}{2}f(2N)-\int_0^\infty \frac{\Im\left(f(i\theta)\right)}{e^{\pi \theta}-1}d\theta\\ &+\sum_{s=1}^m\frac{B_{2s}}{(2s)!}2^{2s-1}f^{(2s-1)}(x)\bigg|_{x=2N}+\hat{R_2}\tag{3'}\end{align}$$
Now, we use $2\times (3')-(1)$ to get the alternating sum
$$\sum_{k=0}^{2N} (-1)^kf(k)=2\sum_{k=0}^{N} f(2k)-\sum_{k=0}^{2N} f(k)$$
also note that
$$-2\int_0^\infty \frac{\Im\left(f(i\theta)\right)}{e^{\pi \theta}-1}d\theta+2\int_0^\infty \frac{\Im\left(f(iy)\right)}{e^{2\pi y}-1}dy=-\int_0^\infty \frac{\Im\left(f(it)\right)}{\sinh(\pi t)}dt$$
So we get the formula for alternating sum
$$\begin{align}\boxed{\sum_{k=0}^{2N} (-1)^kf(k)=\frac{f(0)+f(2N)}{2}-\int_0^\infty \frac{\Im\left(f(it)\right)}{\sinh(\pi t)}dt\\ ~~~~~~~~~~~~~~~~~~~~~~~+\sum_{s=1}^m\frac{B_{2s}}{(2s)!}(4^s-1)f^{(2s-1)}(x)\bigg|_{x=2N}+\hat{R_3}}\tag{4}\end{align}$$
where $\hat{R_3}=2\hat{R_2}-\hat{R_1}$ is the remainder term.
Verify formulas:
Set $f(x)=\ln(1+x)$, we get this integral by using eq.(0)
$$\int_0^\infty \frac{\arctan(x)}{e^{2\pi x}-1} dx =\frac{1}{2}-\frac{1}{4}\cdot\ln(2\pi)$$
Set $f(x)=\ln\left(\frac{(2x+2)^2}{(2x+1)(2x+3)} \right), $ we get this integral by using eq.(0), which is related to Wallis product
$$\int_0^\infty \frac{2\arctan (x)-\arctan (2x)-\arctan\left(\frac{2}3x\right)}{e^{2\pi x}-1}dx=\frac{1}2\ln\left(\frac{3}\pi \right)$$
Set $f(x)=\ln\left(\frac{x+2}{x+1} \right), $ we get this integral by using eq.(4), which is related to Wallis product
$$\int_0^\infty \frac{\arctan\left(\frac{x}2\right)-\arctan (x)}{\sinh(\pi x)}dx=\ln\left(\frac{2\sqrt2}\pi \right)$$
Set $f(x)=x, $ we get this integral by using eq.(4)
$$\int_0^\infty \frac{x}{\sinh(\pi x)}dx=\frac{1}4$$
Set $f(x)=x^2, $ we get this trivial result by using eq.(4)
$$\sum_{k=0}^{2N} (-1)^kk^2=2N^2+N$$
Set $f(x)=x^3, $ we get this integral by using eq.(4)
$$\int_0^\infty \frac{x^3}{\sinh(\pi x)}dx=\frac{1}8$$
My question:
Abel-Plana formula requires the function $f(z)$ is bounded by
$$|f(z)| < \frac{C}{|z|^{1+\epsilon}}\text{, with } C>0, \epsilon >0$$
so that the integral $\int_a^\infty f(x)dx$ is finite and $\lim_{n\to\infty} f(n)\to 0$.
Note that none of above cases satisfy this bounded condition, but we all get correct results. So we don't need this bounded condition when we use this partial summation form, i.e. eq.(0) and eq.(4). Is this true?