Seeking a class of functions for which sums approximate integrals well Is there a "natural" class of integrable functions $f: {\mathbb R} \rightarrow {\mathbb R}$ for which it is true (and, preferably, not too hard to prove!) that $\sup_{0 \leq a < h} |h S(a,h) - I|$ is $O(h^2)$, where $S(a,h)$ denotes the sum $\sum_{n \in {\bf Z}} f(a+nh)$ and $I$ denotes the integral $\int_{-\infty}^{\infty} f(x) \: dx$?  (Note that for fixed $h$, $S(a,h)$ is periodic in $a$ with period $h$, so the supremum over $0 \leq a < h$ is equivalently the supremum over all $a$ in ${\mathbb R}$.)
The class of functions $f(x)$ should include the functions $e^{-x^2}$, $e^{-|x|}$, $\max(1-x^2,0)$, and $\max(1-|x|,0)$.
I can prove this estimate for functions $f$ that (like the four functions listed above) have bounded first derivative and have bounded second derivative on the complement of a finite set of "bad" points, but this class of functions seems rather unnatural.
I would settle for a bound weaker than $O(h^2)$ as long as it's $o(h)$. (Note that the integrability of $f$ gives us $o(1)$ automatically.)
I'm including the fourier-analysis and harmonic-analysis tags because $S(a,h)$ looks like something that could be approached using harmonic analysis.
 A: One class of functions you could consider is those $f$ for which $|f(x)|+|{\hat f}(x)| \le C(1+|x|)^{-1-\delta}$ for some constant $C$ and some $\delta>0$.  Here ${\hat f}(x) = \int_{-\infty}^{\infty} f(t) e^{-2\pi i tx} dt$ is the Fourier transform.  For this class of functions, one can use the Poisson summation formula, which gives 
$$ 
h\sum_{n\in {\Bbb Z}} f(a+nh) = \sum_{k\in {\Bbb Z}} {\hat f}(k/h) e^{2\pi i ak/h}.
$$ 
Since $I={\hat f}(0)$, 
$$ 
|hS(a,h) - I| \le \sum_{k\neq 0} |{\hat f}(k/h)| \le 2C \zeta(1+\delta) h^{1+\delta},
$$ 
using our assumption on $f$.  See e.g. Stein & Weiss, or the wikipedia article on Poisson summation.  The functions you listed would fall into this category.
A: One very cheap bound for the error is 
$$
c h^2 \sum_n \sup_{|x-n| \le 1} |f''(x)|\;,
$$
for a suitable $c$. (I believe that $c=1/3$ works, but haven't checked very carefully.)
This still works if your function satisfies that bound only piecewise, as long as there are finitely many pieces and the function is continuous. (You lose an additional term of order $h^2$ at each "junction". If the function jumps, this term becomes order $h$ and the bound breaks down.) This covers all the examples you gave.
