First of all, the "dirac delta function" is not a true function. It is an example of what mathematicians refer to as a "distribution" or "generalzed function". It is better to think of such things as "operators" ON functions: If f(x) is any function the dirac delta functions applied to it gives f(0): that is normally represented by \int f(x)\delta(x)dx= f(0).
One good way to think of a delta function is as the limit of a sequence of functions. Let f1(x)= 0 if x< -1, 1/2 if -1\le x\le 1, 0 if x> 1.
f2[/sup](x)= 0 if x< -1/2, 1 if -1/2\le x\le 1/2, 0 if x> 1/2.
In general, fn= 0 is x< -1/n, n/2 if -1/n\le x\le 1/n, 0 if x> 1/n.
Notice that the integral of each of those, from -\infty to \infty is just (n/2)(1/n- (-1/n))= (n/2)(2/n)= 1. The Dirac delta function is the "limit" of those. I put "limit" in quotes because, in the usual sense, the functions {fn(x)} have no limit. We think of those as defining the Dirac delta function which, as I said, is not a true function.