It's not hard to extend the theory of integration over ${\bf R}$ so that the integral of any compactly supported function is its usual value, while the integral of $f(t) = \cos (at+b)$ (with $a \neq 0$) or $f(t) = \sin (at+b)$ (or any finite superposition of such functions, even with incommensurable periods) is $0$; for instance, introduce a suitable kernel $g(t)$ such as $\exp(-t^2)$ and define $\int_{\bf R} f$ to be $\lim_{s \rightarrow \infty} \int_{-\infty}^{\infty} f(t) \: g(t/s) \: dt$. But I have trouble when I try to do this for integrals over ${\bf R}^2$, and things go seriously amiss over ${\bf R}^3$. It seems that all mollifiers fail, basically because the surface measure of bodies in ${\bf R}^d$ is "too big" compared to the interior measure when $d > 1$ (a problem that gets worse and worse as $d$ increases).

What I want is a theory of generalized integration over ${\bf R}^d$ such that compactly supported functions integrate to their usual value, while periodic functions with mean value $0$ integrate to $0$; and I want this theory to apply to a vector space of functions (that is, I want arbitrary linear combinations of finitely many generalized-integrable functions to be generalized-integrable).

Is there (or could there be) such a theory?