TITLE: Question about the dirac $\delta$-function
QUESTION [9 upvotes]: I have a basic question about the dirac $\delta$-function based on the beginning of Chapter 1 of these notes.
The dirac $\delta$-function can be defined heuristically as the function that is $0$ everywhere except as $x = 0$, where it is $\infty$.
But formally, this is not the definition of the functional (since it's not a function).  Here is my question:

Since $\delta$(x) is not defined for each $x$, how can we talk about the product $(f(x)-f(0))\delta(x)$?  The author says this is identically $0$.  Why?  If we are using the heuristic definition of $\delta$, then when $x \neq 0$, $\delta(x) = 0$ so the product is $0$, and if $x = 0$, then we get $(f(0) - f(0))\cdot \infty$, but who is to say this is equal to $0$?  If $0 \cdot \infty$ always equaled $0$, then under this heuristic definition, we should have $\int \limits_{\Bbb R} \delta(x) \,dx = \int \limits_{\Bbb R - \{0\}} \delta(x) \,dx + \int \limits_{ \{0\} } \delta(x)\,dx = 0 + 0 \cdot \infty = 0$, but this integral is by definition equal to $1$.  But even so, what if we aren't using the heuristic definition?

REPLY [3 votes]: As the other answers testify, there are many useful viewpoints on "what's really happening" with Dirac's $\delta$. Also, there is the chronic confusion of whether "formal" means that something is really true/correct for trivial reasons, or, rather, that it is a suggestive heuristic that perhaps cannot be made legitimate but is useful.
The most specific response I have to the original question is simply about multiplying (compactly supported) distributions $u$ by smooth functions $f$ to obtain another distribution: $f\cdot u$ is the distribution defined by $(f\cdot u)(\varphi)=u(f\cdot \varphi)$ where $f\cdot \varphi$ is the pointwise multiplication, producing another test function.
Thus, in the case at hand, for any $f$ vanishing at $0$ (e.g., produced by replacing $f$ by the function $x\to f(x)-f(0)$), we have $(f\cdot \delta)(\varphi)=\delta(f\cdot \varphi)=(f\cdot\varphi)(0) = f(0)\cdot u(0)=0$. That is, such $f\cdot \delta$ is the $0$ distribution, not the number $0$. 
As some answers noted, $\int_{\mathbb R}\delta(x)\cdot 1\;dx$ can be construed as $\langle \delta,1\rangle$. Rather than disclaiming the integral expression by saying it's "just formal", why not say that it is to be interpreted as the extension to the pairing between distributions and test functions of the pairing of test functions and test functions by integrating-against. It is the extension-by-continuity of that pairing, using the weak-dual topology on distributions, after all.
There is some precedent for taking the viewpoint that "formally meaningless" integrals are in fact precise, meaningful extensions-by-continuity of pairings that are literal integrals on dense subspaces. Fourier transform and inversion on $L^2(\mathbb R)$ are examples of this: the integral itself only makes sense on $L^1$, but after proving Plancherel, we extend-by-isometry/continuity, and still write the integral, even though it is not literally that integral.
There is also the possibility of thinking of "multiplication by" $\delta$ as an operator mapping test functions to distributions, as suggested in some other answers. But here one might consider writing $\delta\otimes \delta$ when it's meant as an operator. Indeed, for two distributions $\alpha,\beta$, the operator $\alpha\otimes \beta$ is $(\alpha\otimes\beta)(\varphi)=\beta(\varphi)\cdot \alpha$. These are rank-one operators given by the "smallest" possible Schwartz kernels...