I found this nice formula relating sums and integrals:
For example, with f(i) = 1/(2^i)
To see why consider this plot for the function inside the rightmost integrand:
This function is scaled by a factor to make it so the integral from x-1/2 to x+1/2 for a particular x=i is equal to the value of the sum at i. This is done by dividing by the integral from -1/2 to 1/2. to make it 1 then rescaling by f(0).