Evaluating the limit of a certain definite integral 
Let $\displaystyle f(x)= \lim_{\epsilon \to 0} \frac{1}{\sqrt{\epsilon}}\int_0^x ze^{-(\epsilon)^{-1}\tan^2z}dz$ for $x\in[0,\infty)$.
Evaluate $f(x)$ in closed form for all $x\in[0,\infty)$ and sketch a graph of this function.

Hints, as well as solutions are welcome for this question :-)
Edit:  So far, I have, from substituting $\sqrt{\epsilon}u$ = z,
$\displaystyle f(x)= \lim_{\epsilon \to 0} \int_0^{\sqrt{\epsilon}u}  \sqrt{\epsilon}ue^{-(\epsilon)^{-1}\tan^2\sqrt{\epsilon}u}du$
But we can split the integral into two terms, with the first integral equal to zero, by dominated convergence theorem.  I think we only need to look at:
$\displaystyle f(x)= \lim_{\epsilon \to 0} \int_0^{a}  \sqrt{\epsilon}ue^{-(\epsilon)^{-1}\tan^2\sqrt{\epsilon}u}du$ +
$\displaystyle \lim_{\epsilon \to 0} \int_a^{\sqrt{\epsilon}u}  \sqrt{\epsilon}ue^{-(\epsilon)^{-1}\tan^2\sqrt{\epsilon}u}du$
= $$0+\displaystyle \lim_{\epsilon \to 0} \int_a^{\sqrt{\epsilon}u}  \sqrt{\epsilon}ue^{-(\epsilon)^{-1}\tan^2\sqrt{\epsilon}u}du$$
(I'm not sure if integrating away from the origin helps much, to be honest.)
 A: Consider what happens on an interval $[n\pi-\frac\pi2,n\pi+\frac\pi2]$. Let $x=\tan(z)$ and $u=x/\sqrt{\epsilon}$, then
$$
\begin{align}
\lim_{\epsilon\to0}\frac1{\sqrt{\epsilon}}\int_{n\pi-\frac\pi2}^{n\pi+\frac\pi2}e^{-\tan^2(z)/\epsilon}\,\mathrm{d}z
&=\lim_{\epsilon\to0}\frac1{\sqrt{\epsilon}}\int_{-\infty}^\infty e^{-x^2/\epsilon}\frac{\mathrm{d}x}{1+x^2}\\
&=\lim_{\epsilon\to0}\int_{-\infty}^\infty e^{-u^2}\frac{\mathrm{d}u}{1+\epsilon u^2}\\
&=\int_{-\infty}^\infty e^{-u^2}\,\mathrm{d}u\\[6pt]
&=\sqrt\pi\tag{1}
\end{align}
$$
For all $\epsilon\gt0$, we have
$$
\frac1{\sqrt\epsilon}e^{-\tan^2(z)/\epsilon}\le\frac{|\cot(z)|}{\sqrt{2e}}\tag{2}
$$
Thus, for any $\lambda\gt0$, Dominated Convergence says
$$
\lim_{\epsilon\to0}\frac1{\sqrt{\epsilon}}\int_{n\pi-\frac\pi2}^{n\pi+\frac\pi2}\big[|z-n\pi|\ge\lambda\big]e^{-\tan^2(z)/\epsilon}\,\mathrm{d}z=0\tag{3}
$$
where $[\cdot]$ are Iverson Brackets. Combining $(1)$ and $(3)$ gives
$$
\lim_{\epsilon\to0}\frac1{\sqrt{\epsilon}}\int_{n\pi-\frac\pi2}^{n\pi+\frac\pi2}\big[|z-n\pi|\lt\lambda\big]e^{-\tan^2(z)/\epsilon}\,\mathrm{d}z=\sqrt\pi\tag{4}
$$
Limits $(3)$ and $(4)$ tell us that $\frac1{\sqrt\epsilon}e^{-\tan^2(z)/\epsilon}$ is an approximation of
$$
\sqrt\pi\sum_{n\in\mathbb{Z}}\delta(z-n\pi)\tag{5}
$$
where $\delta(z)$ is the Dirac delta function.
Thus,
$$
\bbox[5px,border:2px solid #C0A000]{\lim_{\epsilon\to0}\frac1{\sqrt{\epsilon}}\int_0^xz\,e^{-\tan^2(z)/\epsilon}\,\mathrm{d}z
=\left\{\begin{array}{}
\displaystyle\pi^{3/2}\,\frac{\lfloor x/\pi\rfloor^2+\lfloor x/\pi\rfloor}2&\text{if }x\not\in\pi\mathbb{Z}\\
\displaystyle\pi^{-1/2}\,\frac{x^2}2&\text{if }x\in\pi\mathbb{Z}
\end{array}\right.}\tag{6}
$$
The plot would look something like

A: NOTE:
I wanted to give a special thanks to @robjon for his insightful comments.

We first observe that $\lim_{\epsilon\to 0}e^{-\tan z/\epsilon}=0$ unless $z=\ell \pi$, $\ell$ an integer.  Therefore, all of the "action" of the integration will take place over intervals around $\ell \pi$.  So, let's first see what is happening for $0<x<\pi/2$.

In the spirit of Laplace's Method, we have for $0<z<\pi/2$, $\tan^z =z^2+O(z^4)$ and thus for $0<x<\pi/2$
$$\begin{align}
\epsilon^{-1/2}\int_0^xze^{-\tan^2z/\epsilon}dz&\sim\epsilon^{-1/2}\int_0^xze^{-z^2/\epsilon}dz\\\\
&=\epsilon^{-1/2}\left.\left(-\epsilon^{-z^2/\epsilon}\right)\right|_{z=0}^{z=x}\\\\
&=\epsilon^{1/2}\left(1-e^{-x^2/\epsilon}\right)
\end{align}$$
which clearly goes to zero as $\epsilon\to 0$.

Next, we observe that the integration around singularities of the tangent function pose no challenge.  Thus, for a general $(L-1)\pi<x<L\pi$, and $\delta >0$ we can write
$$\begin{align}
\epsilon^{-1/2}\int_0^x ze^{-\tan^2z/\epsilon}dz&=\epsilon^{-1/2}\sum_{\ell=0}^{L-2}\left(\int_{\ell \pi+\delta}^{(\ell+1)\pi-\delta}ze^{-\tan^2z/\epsilon}dz+\int_{(\ell+1)\pi-\delta}^{(\ell+1)\pi+\delta}ze^{-\tan^2z/\epsilon}dz\right)\\\\
&+\epsilon^{-1/2}\int_{(L-1)\pi+\delta}^{x}ze^{-\tan^2z/\epsilon}dz \tag 1\\\\
\end{align}$$
We observe that in $(1)$ the only integrals that will contribute in the limit as $\epsilon \to 0$ are those around integer multiples of $\pi$.  Thus, we have for $(L-1)\pi<x<L\pi$ and $\delta>0$
$$\begin{align}
\lim_{\epsilon \to 0}\epsilon^{-1/2}\int_0^x ze^{-\tan^2z/\epsilon}dz&=\lim_{\epsilon \to 0} \epsilon^{-1/2}\sum_{\ell=0}^{L-2}\left(\int_{(\ell+1)\pi-\delta}^{(\ell+1)\pi+\delta}ze^{-\tan^2z/\epsilon}dz\right) \tag 2\\\\
\end{align}$$
We proceed to evaluate the integrals in $(2)$.  To that end we have
$$\begin{align}
\epsilon^{-1/2}\int_{(\ell+1)\pi-\delta}^{(\ell+1)\pi+\delta}ze^{-\tan^2z/\epsilon}dz &=\epsilon^{-1/2}\left(\int_{-\delta}^{\delta}ze^{-\tan^2z/\epsilon}dz+(\ell +1)\pi\int_{-\delta}^{\delta}e^{-\tan^2z/\epsilon}dz\right)\\\\
&=(\ell +1)\pi\epsilon^{-1/2}\int_{-\delta}^{\delta}e^{-\tan^2z/\epsilon}dz\\\\
&\sim (\ell +1)\pi\epsilon^{-1/2}\int_{-\delta}^{\delta}e^{-z^2/\epsilon}dz\\\\
&= (\ell +1)\pi\int_{-\delta/\epsilon^{1/2}}^{\delta/\epsilon^{1/2}}e^{-z^2}dz\\\\
&\to (\ell +1)\pi^{3/2}
\end{align}$$
Summing over $\ell$ we find for $(L-1)\pi<x<L\pi$
$$\lim_{\epsilon \to 0}\epsilon^{-1/2}\int_0^xze^{-\tan^2z/\epsilon}dz=\frac{L(L-1)\pi^{3/2}}{2}$$
One final note concerns the case in which $x=L\pi$.  For that case, we see that we need to add one more integral, namely 
$$\begin{align}
\lim_{\epsilon\to 0}\epsilon^{-1/2}\int_{L\pi-\delta}^{L\pi}ze^{-\tan^z/\epsilon}&=L\pi\int_{-\infty}^0e^{-z^2}dz\\\\
&=\frac12 L\pi^{3/2}
\end{align}$$
Thus, for $x=L\pi$ we have 
$$\lim_{\epsilon \to 0}\epsilon^{-1/2}\int_0^xze^{-\tan^2z/\epsilon}dz=\frac{L^2\pi^{3/2}}{2}$$
Putting it all together we have 
$$\lim_{\epsilon \to 0}\epsilon^{-1/2}\int_0^xze^{-\tan^2z/\epsilon}dz=
\begin{cases}
\frac{L(L-1)\pi^{3/2}}{2},&(L-1)\pi<x<L\pi\\\\
\frac{L^2\pi^{3/2}}{2},&x=L\pi
\end{cases}
$$
A: For small $\epsilon$, 
$\tan^2(\sqrt{\epsilon} u )
\approx \epsilon u^2$, 
so the integral is of 
approximately
$\sqrt{\epsilon}u e^{-u^2}$ 
which can be integrated.
