Multiplication of two Dirac impulses is undefined. However, convolution of two Dirac impulses is defined [1]:
$$\delta(t-t_1)\star\delta(t-t_2)=\delta\big(t-(t_1+t_2)\big)\tag{1}$$
Writing out $(1)$ gives
$$\begin{align}\delta(t-t_1)\star\delta(t-t_2)&=\int_{-\infty}^{\infty}\delta(x-t_1)\delta(t-x-t_2)dx\\&=\int_{-\infty}^{\infty}\delta(x-t_1)\delta(x-(t-t_2))dx\tag{2}\end{align}$$
where I've used the fact that $\delta(t)$ is even.
The last integral in $(2)$ has the same form as the integral in the OP. Hence, using $(1)$ with $t_1=\tau$ and $t-t_2=\beta$ we obtain
$$\int_{-\infty}^{\infty}\delta(t-\tau)\delta(t-\beta)dt=\delta(\beta-\tau)\tag{3}$$
As correctly pointed out by Jazzmaniac, the integral in $(3)$ is a distribution, and as such it only makes sense if wrapped by an integral with $\beta$ or $\tau$ as the integration variable. This is always the case with Dirac impulses and distributions in general. Eq. $(3)$ has to be understood in that sense.
[1]A. Papoulis, *The Fourier Integral and Its Applications*, p. 275
The quantity $\delta^2(t)$ is undefined, however,
$$\small{\delta(t-t_1)*\delta(t-t_2)=\int_{-\infty}^\infty\delta(\tau-t_1)\delta(t-\tau-t_2)\,d\tau=\delta[t-(t_1+t_2)]\tag{I-29}}$$
as we can easily see from $\text{(I-15)}$.
The product of two distributions $g_1(t)$ and $g_2(t)$ is, in general, undefined; however, their convolution is given by
$$\small{\begin{array}{rl}\displaystyle\int_{-\infty}^\infty\bigg[\int_{-\infty}^\infty g_1(\tau)g_2(t-\tau)\,d\tau&\hspace{-1em}\bigg]\phi(t)\,dt\\&\displaystyle\hspace{-1em}=\int_{-\infty}^\infty g_1(\tau)\bigg[\int_{-\infty}^\infty g_2(t-\tau)\phi(t)\,dt\bigg]d\tau\tag{I-15}\end{array}}$$
as we see, by a formal change of the order of integration.