In the theory of tempered distributions (which is one way to formalize the Dirac delta function), the identity of a distribution is entirely determined by the results you get by convolving it with Schwartz functions.
Therefore, if you compute a distribution g that satisfies the relation2
[tex]\int_{-\infty}^{+\infty} g(x) f(x) \, dx = f(0)[/tex]
for every Schwartz function f, then g is equal to the Dirac delta distribution1. And equality is transitive: if you compute another distribution h that also satisfies that relation, then g = h.
1: I will use this name, since the Dirac delta isn't a function
2: Note that this integral is a generalization of what you learned in calculus. In particular, it's not defined as a limit of Riemann sums.