I have been following the course in Introduction to Probability, Statistics and Random Processes, by Hossien Pishro-Nik, and I was having some troubles understanding proof in chapter 4.3.2 Using the Delta Function. The lemma states that $$\int_{-\infty}^{\infty} g(x) \delta(x-x_0) dx = g(x_0).$$
The proof states that, let $I$ bet the value of the above integral. Then, we have $$I= \lim_{\alpha \rightarrow 0} \bigg[ \int_{-\infty}^{\infty} g(x) \delta_{\alpha} (x-x_0) dx \bigg]$$ $$=\lim_{\alpha \rightarrow 0} \bigg[ \int_{x_0-\frac{\alpha}{2}}^{x_0+\frac{\alpha}{2}} \frac{g(x)}{\alpha} dx \bigg].$$ By the mean value theorem in calculus, for any $α>0$, we have $$\int_{x_0-\frac{\alpha}{2}}^{x_0+\frac{\alpha}{2}} \frac{g(x)}{\alpha} dx=\alpha \frac{g(x_{\alpha})}{\alpha}=g(x_{\alpha}),$$ for some $x_{\alpha} \in (x_0-\frac{\alpha}{2},x_0+\frac{\alpha}{2}).$ Thus, we have $$I = \lim_{\alpha \rightarrow 0} g(x_{\alpha})=g(x_0).$$
Now, the lemma makes sense intuitively but I am unable to understand why $$\int_{x_0-\frac{\alpha}{2}}^{x_0+\frac{\alpha}{2}} \frac{g(x)}{\alpha} dx=\alpha \frac{g(x_{\alpha})}{\alpha}=g(x_{\alpha}).$$ From my understanding of the mean value theorem, shouldn’t $$\int_{x_0-\frac{\alpha}{2}}^{x_0+\frac{\alpha}{2}} \frac{g(x)}{\alpha} dx=\frac{1}{\alpha}\frac{G(x_{0}+\frac{\alpha}{2})-G(x_{0}-\frac{\alpha}{2})}{(x_{0}+\frac{\alpha}{2})-(x_{0}-\frac{\alpha}{2})}$$ $$=\frac{1}{\alpha}\frac{G(x_{0}+\frac{\alpha}{2})-G(x_{0}-\frac{\alpha}{2})}{\alpha}=\frac{G(x_{\alpha})}{\alpha^2},$$ where $G(x_{\alpha})$ is $G(x)$ defined in some range $x_{\alpha} \in (x_0-\frac{\alpha}{2},x_0+\frac{\alpha}{2}).$
As you can see I am unable to understand how the author managed to achieve the result he stated. Can you please help me understand how the author achieved the result?