While studying the lecture notes of my quantum mechanics course I came across something that seemed a bit odd. There we want to solve the Schrödinger equation for the potential $V(x)=V_0 \delta(x)$, where $\delta(x)$ represents the "delta-function". We therefore get the equation $$-\frac{\hbar^2}{2m}\psi''(x)+V_0\delta(x)\psi(x)=E\psi(x),$$ where the solutions are of the form $\psi_{\rm left}(x)=A\exp(ikx/\hbar)+B\exp(-ikx/\hbar)$ with the energy $E= k^2/2m$ for $x<0$ and analogous for $x>0$ we find $\psi_{\rm right}$. We know that $$\lim\limits_{x\to 0^-} \psi_{\rm left} = \lim\limits_{x\to 0^+}\psi_{\rm right}$$ should hold but also need a second condition. The professor then proceeded to write the following.
We integrate eq. (1) [the first equation in this post] form $-\epsilon$ to $\epsilon$ and get $$-\frac{\hbar^2}{2m}(\psi'(\epsilon)-\psi'(-\epsilon))+V_0\psi(0)=E\int^\epsilon_{-\epsilon} \psi(x) dx.$$ For $\epsilon \to 0$ we get $$\psi ^ { \prime } \left( 0 ^ { + } \right) - \psi ^ { \prime } \left( 0 ^ { - } \right) = \frac { 2 m V } { \hbar ^ { 2 } } \psi ( 0 ),$$ where $$ f \left( 0 ^ { + } \right) = \lim _ { x \rightarrow 0 \atop x > 0 } f ( x ) \quad f \left( 0 ^ { - } \right) = \lim _ { x \rightarrow 0 \atop x < 0 } f ( x ).$$
My main confusion here comes from the fact that apparently $$\int_{-\epsilon}^{\epsilon} \delta(x)\psi(x)dx = \psi(0).$$ Could someone explain this?
Notes on my background in math: In a course on mathematical physics we talked briefly about (tempered) distributions and there we saw the definition $$\delta[\varphi] =\int_\mathbb{R^n}\varphi(x)\delta(x)dx = \varphi(0),$$ for $\varphi \in \mathcal{S}(\mathbb{R}^n)$ and $$\mathcal { S } \left( \mathbb { R } ^ { n } \right) : = \left\{ \phi \in C ^ { \infty } \left( \mathbb { R } ^ { n } \right) \Big| \forall \alpha , \beta \in \mathbb { N } _ { 0 } ^ { n } : \sup _ { x \in \mathbb { R } ^ { n } } | x ^ { \alpha } D ^ { \beta } \phi ( x ) | < \infty \right\}.$$ I'm aware of the fact that in physics we often use the $\delta$-"function" rather sloppy and tend to brush of problematic arguments away with some kind of intuition (at least that's how it was presented to me up until this point) but I fail to see how it can be considered the same to integrate over an interval $[-\epsilon, \epsilon]$ and over $\mathbb{R}$ in this case.