I need to prove that $\delta_n(x)=\sin (nx)/\pi x$ is a delta function. That is, to prove that: $$\underset{n\rightarrow \infty}{\lim}\int^\infty_{-\infty}f(x)\frac{\sin( nx)}{\pi x}dx=f(0).$$ For that I made $y=x/n$ and took the limit under the integral since $f(x)$ is supposed to be analytic in $\mathbb{R}$. I have a fundamental limit for the $\sin$ leaving me with $$\int^\infty_{-\infty}f(0)\cdot1 \;dy.$$ But this is equal to $f(0)$ $\iff$ $f(x)$ have contribuition only at $x=0$, but here the only assumption is that $f(x)=0$ when $x\rightarrow \pm \infty$.
What is wrong here?
Since $\delta_n(x)=n\delta_1(nx)$,$$\begin{align}\int_{\Bbb R}\delta_n(x)f(x)dx&=\int_{\Bbb R}\delta_1(y)f(y/n)dy\\\implies\lim_{n\to\infty}\int_{\Bbb R}\delta_n(x)f(x)dx&=\lim_{n\to\infty}\int_{\Bbb R}\delta_1(y)f(y/n)dy\\&\stackrel{*}{=}\int_{\Bbb R}\delta_1(y)\lim_{n\to\infty}f(y/n)dy\\&=f(0)\underbrace{\int_{\Bbb R}\delta_1(y)dy}_{1},\end{align}$$provided $f$ has the right behaviour for $\stackrel{*}{=}$ to be legal. For example, while $f$ being a Schwartz function suffices, $f$ being analytic doesn't.