Anti-delta function? Did anyone ever consider a "function" or "distribution" $F(x)$ with the following property:
its integral $\int_a^b F(x)\,dx=0$ for any finite interval $(a,b)$ but $\int_{-\infty}^\infty F(x)\,dx=1$? It definitely can be seen as a limit of smooth functions, and its Fourier transform will be a finction, equal to $1$ at $0$ and otherwise $0$.
I think such object for sure should be considered and named by someone.
 A: This is more a long comment following the ones of Mateusz Kwasnicki and Anixx and the nice answers given by Michael Hardy, Gro-Tsen, et al.
As stated by Mateusz, such a mathematical objiect cannot be a function nor a distribution: indeed in this last case, without a compactification of the real line (as suggested by Gro-Tsen'asnswer), there's no $\varphi\in C_0^\infty$ whose support is compact and includes the point at infinity, so the space of functionals on function spaces made of this functions is necessarily empty. However, this limitation is not inherited by hyperfunctions: there exist hyperfunctions, notably Fourier hyperfunctions, "supported" (it is better to say "carried", since the support of a distribution and the carrier of a hyperfunction are not exactly the same) at $x=+\infty$. The first explicit example of such kind of generalized functions was constructed by Morimoto and Yoshino [2], and was lated simplified and extended by Akira Kaneko in [1] (who also deals with the higher dimensional case). The method (as explained by Kaneko [1] pp. 99-100) consists in choosing a defining function for the sought for hyperfunction which grows very fast on the real axis, for example $e^{e^{z^2}}=\exp\big(e^{z^2}\big)$, and a path $\gamma$ to $+\infty$ along which it rapidly decreases: then the holomorphic function $F(z)$ defined as
$$\DeclareMathOperator{\dmu}{\operatorname{d}\!}
F(z) = \frac{1}{2\pi i}\int\limits_\gamma \frac{\exp\big(e^{\zeta^2}\big)}{\zeta-z} \dmu\zeta
$$
is such that its "boundary value" (i.e. the defined hyperfunction) $f(x) =F(x+i0)-F(x-i0)$ is $0$ for all finite $x\in\Bbb R$, as it can be proved by deforming the integration path and using the standard Cauchy integral theorem. But nevertheless it is
$$
F(x)= \exp\big(e^{x^2}\big) + \frac{1}{2\pi i}\int\limits_\gamma \frac{\exp\big(e^{\zeta^2}\big)}{\zeta -x} \dmu\zeta
$$
thus the "boundary value" of $F$ produces a non trivial Fourier hyperfunction carried at $+\infty$.
Bibliography
[1] Akira Kaneko, "Explicit construction of Fourier hyperfunctions supported at infinity" (English), Kawai, Takahiro (ed.) et al., Microlocal analysis and complex Fourier analysis, River Edge, NJ: World Scientific Publishers, ISBN 981-238-161-9/hbk, pp. 99-114 (2002), MR2068531, Zbl 1046.46031.
[2] Mitsuo Morimoto, Kunio Yoshino, "Some examples of analytic functionals with carrier at the infinity" (English),Proceedings of the Japan Academy, Series A 56, 357-361 (1980), MR0596004,  Zbl 0471.46024.
A: It seems to me that, insofar as a "generalized distribution" like your $F$ exists in some sense, there would have to be a continuum of them, corresponding to different possible values $0 ≤ c ≤ 1$ of the integral $c = \int_{-\infty}^0 F_c(x)\ {\rm d}x$ over the left half line.*
In some sense, every such $F_c$ is indeed a generalized probability distribution.  In particular, every probability distribution $g$ over the real line is uniquely defined by its cumulative distribution function (CDF), i.e. the unique function $G$ such that $\int_a^b g(x)\ {\rm d}x = G(b) - G(a)$.
Normally we insist that if $G$ is a CDF over $\mathbb R$ it must satisfy $\lim_{x \to -\infty}G(x) = 0$ and $\lim_{x \to +\infty}G(x) = 1$, which essentially amounts to insisting that all of the probability mass of the corresponding distribution $g$ can be found somewhere along the real line (or, more precisely, that for any $\epsilon > 0$ we can find a bounded interval $[a,b] \in \mathbb R$ such that $\int_a^b g(x)\ {\rm d}x ≥ 1 - \epsilon$).
However, if we relax that restriction, then the "distribution" $F_c$ has a well defined and unique CDF — which is merely the constant $c$.  And it seems to me that a lot of the theory of probability distributions should indeed generalize decently well to such "improper" distributions with non-zero probability mass at (positive and/or negative) infinity.**
I'm not, unfortunately, personally familiar with any existing literature on such generalized probability distributions and their uses.  But I'd be very surprised if no-one had studied these things at some point.

*) Of course even more possibilities exist if we allow the integral of $F_c$ to be negative over some (unbounded) intervals, in which case $c$ could be any real number.  But I suspect that this is generalizing a bit too far, since non-negativity of the integral is a natural and useful property of probability distributions.  And if we do wish to go beyond those and consider (generalizations of) arbitrary signed measures, then I see no good reason to keep the restriction $\int_{-\infty}^{\infty} F(x)\ {\rm d}x = 1$ either.
**) In fact, I guess one could simply treat these things as distributions over the extended real number line.  Which I suppose may be why nobody's bothered to study them much, since looked at like that, the whole concept is really rather trivial.
A: We can define your "anti-delta function" as an unusual type of distribution.
First, describe $F$ in terms of the integral $\langle F,\varphi\rangle:=\int_{-\infty}^{\infty}F(x)\,\varphi(x)\,dx$ for some test function $\varphi$.
If I understand you correctly, you want this to be $\langle F,\varphi\rangle=\lim\limits_{a\to\infty}\frac{1}{2a}\int_{-a}^{a}\varphi(x)\,dx$, which is a linear functional of $\varphi$.
Distributions are defined as continuous/bounded linear functionals on a given space of test functions.
There are various different spaces of distributions, depending on the domain of $\varphi$ used in their definition. The "anti-delta function" is not a distribution in the normal sense, because on the usual domains like $C_{c}^\infty$ or $C^\infty$ our functional $\langle F,\,\cdot\,\rangle$ is either identically zero, ill-defined or unbounded. To make $F$ a distribution, we need to choose another space of test functions $\varphi$, such that the limit $\lim\limits_{a\to\infty}\tfrac{1}{2a}\int_{-a}^{a}\varphi(x)\,dx$ is well-defined and continuous in $\varphi$.
A way to construct viable function spaces and to simplify $\langle F, \varphi\rangle$ is to extend the domain of $\varphi$ to a compactification of $\mathbb{R}$.
Possible test functions would include continuous functions on the one-point compactification $\mathbb{R}\cup\{\infty\}$, where $\langle F,\varphi\rangle=\varphi(\infty)$ (making it a "delta function at infinity").
Some of the other answers can be seen as variants of this: Using CDFs is equivalent to considering test functions $\varphi:\mathbb{R}\cup\{-\infty,\infty\}\to \mathbb{R}$ on the two-point compactification, where $\langle F,\varphi\rangle = c\,\varphi(-\infty)+(1-c)\,\varphi(\infty)$. Hyperfunctions are generalized distributions with holomorphic test functions.
A: Let $\beta\mathbb{R}$ be the Stone-Čech compactification of $\mathbb{R}$: any bounded continuous function $f$ on $\mathbb{R}$ extends uniquely to a (necessarily bounded) continuous function $f^\beta$ on $\beta\mathbb{R}$.  Now consider a Radon probability measure $\mu$ on $\beta\mathbb{R} \setminus \mathbb{R}$ (which might simply be the Dirac measure concentrated on a point of $\beta\mathbb{R} \setminus \mathbb{R}$).  Then integrating $f^\beta$ against $\mu$ gives a kind of “integral” of $f$ which has the properties you want: it is independent of the values of $f$ on any finite interval, and is equal to the limit of $f$ at infinity if such exists: so if you see $f$ as test functions (or restrict to some space of test functions that includes at least the bounded continuous functions) and see this integral as $\int f F$ for some generalized function $F$ (defined through its integral of test functions, like distributions), you have the properties you asked for.  But it is, obviously, very far from unique.
The notion of a Banach limit is very closely related to what I just said (but for the natural numbers instead of the reals).
A: There's quite a bit on this in Harold Jeffreys's unusual book Theory of Probability, in which such a function is one of the more prominent examples of “improper priors.” In Robert, Chopin, and Rousseau – Harold Jeffreys's Theory of Probability Revisited we find this:

For a 21st century reader, Jeffreys’s Theory of Probability is nonetheless puzzling for its lack of formalism, including its difficulties in handling improper priors, its reliance on intuition, its long debate about the nature of probability, and its repeated attempts at philosophical justifications. The title itself is misleading in that there is absolutely no exposition of the mathematical bases of probability theory in the sense of Billingsley (1986) or Feller (1970): “Theory of Inverse Probability” would have been more accurate. In other words, the style of the book appears to be both verbose and often vague in its mathematical foundations for a modern reader.

Consider the upper half-plane $\{(m,s): -\infty<m<+\infty,\, 0<s<+\infty\}$ with the measure $dm\,ds/s.$ Pretend that when multiplied by some infinitely small constant (“constant” = not depending on $m$ or $s$) this becomes a probability measure on the upper half-plane. Now suppose that the conditional probability distribution of $X_1,\dotsc,X_n$ given $m$ and $s$ is that they are independent and normally distributed with expected value $m$ and variance $s$ (variance, not standard deviation). What then is the conditional distribution of $(m,s)$ given $X_1,\dotsc,X_n$? It is a perfectly ordinary probability distribution. Jeffreys proposes that that is the conditional probability distribution of the expectation and variance of a population from which $X_1,\dotsc,X_n$ is a random sample, when one has no other information about their values than what one gets from that sample.
Another example is the measure $c\,dp/\bigl(p(1-p)\bigr)$ whose integral over $(0,1)$ is $1$. Suppose $X_1,\dotsc,X_n$ are conditionally independent given $p$ and $\Pr(X_k=1\mid p) = p$ and $\Pr(X_k=0\mid p)=1-p$ for $k=1,\dotsc,n$. Then the conditional distribution of $p$ given $X_1,\dotsc,X_n$ is $\text{constant}\times p^{X_1+\dotsb+X_n-1}(1-p)^{n-(X_1+\dotsb+X_n)-1} \, dp,$ which is a perfectly ordinary probability distribution except when $X_1+\dotsb+X_n\in\{0,n\}$.
I think Jeffreys's doctorate was in mathematics, and he was a professor of astronomy for some time, and spent a lot of time on seismology and earth sciences, and in the '50s claimed to be able to tell the difference between seismic waves resulting from nuclear tests and those from earthquakes when the U.S. government was denying that that could be done.
The physicist Edwin Jaynes defended improper priors in a number of his writings.
A: To elaborate on the comment, I would suggest to take $F(x)=x^{-2}\delta(1/x)$. Let me check for the representation
$\delta_{\epsilon}(x)=(2\pi\epsilon)^{-1/2}e^{-x^2/2\epsilon}$,
and $F_\epsilon(x)=x^{-2}\delta_\epsilon(1/x)$. Then $\int_{-\infty}^\infty F_\epsilon(x)dx=1$, for any $\epsilon$, while $\lim_{\epsilon\rightarrow 0}\int_a^b F_\epsilon(x)\,dx=0$. It seems to have the desired properties.
