A problem occurs when I was solving an exersice of perturbative kind. The delta function has the fundamental property that
\begin{align} \int_{-\infty}^{\infty}f(x)\delta(x-a)dx=f(a) \end{align}
and, in fact, \begin{align} \int_{a-\epsilon}^{a+\epsilon}f(x)\delta(x-a)dx=f(a) \end{align} How change these formula if $a$ is not in the domain of integration? \begin{align} \int_{-\infty}^{a-\epsilon}f(x)\delta(x-a)dx + \int_{a+\epsilon}^{\infty}f(x)\delta(x-a)dx\end{align}
Also if $a$ is one of upper or lower bounds?
If you have an integral of the form $$ \int_\alpha^\beta f(x)\delta(x-a)\mathrm dx $$ with a finite (and fixed!, i.e. it does not depend on $a$) domain of integration, then $$ \int_\alpha^\beta f(x)\delta(x-a)\mathrm dx=\begin{cases} f(a)& \text{if }\alpha<a<\beta \\ 0& \text{otherwise}. \end{cases} $$
This is because $\delta(x-a)$ is zero for all $x=a$, so you're integrating something that is identically zero (and without any funky spikes), and that gives zero.
More rigorously, you can rephrase any integral with finite integration domain $(\alpha,\beta)$ in terms of the characteristic function $\chi_{(\alpha,\beta)}$ of the interval,
$$\chi_{(\alpha,\beta)}(x)=\begin{cases} 1& \text{if }\alpha<x<\beta, \\ 0& \text{otherwise}, \end{cases}$$
so that $$ \int_\alpha^\beta F(x)\mathrm dx=\int_{-\infty}^\infty\chi_{(\alpha,\beta)}(x)F(X)\:\mathrm dx $$ for any function $F$, and therefore \begin{align} \int_\alpha^\beta f(x)\delta(x-a)\mathrm dx & = \int_{-\infty}^\infty\chi_{(\alpha,\beta)}(x) f(x)\delta(x-a)\:\mathrm dx \\ & = \chi_{(\alpha,\beta)}(a) f(a) \\ & =\begin{cases} f(a)& \text{if }\alpha<a<\beta, \\ 0& \text{otherwise}. \end{cases} \end{align}