This problem has a certain flaw in it. Suppose the definition of limit is as follows:

*Let $f$ be defined in a certain neighborhood of $a$ except possibly at $a$. A number $L$ is said to be the limit of $f$ at $a$ (written $\lim_{x \to a}f(x) = L$) if for any given $\epsilon > 0$ there is a $\delta > 0$ such that $|f(x) - L| < \epsilon$ whenever $0 < |x - a| < \delta$.*

Then the function $f$ in question does not possess a limit at $x = 0$ because the function is not defined in any neighborhood of $0$ (think of points $x = 1/n\pi$ where $n$ is non-zero integer).

Suppose the definition of limit is as follows:

*Let $A$ be a non-empty subset of $\mathbb{R}$ and let $f:A \to \mathbb{R}$ be a function and further let $a$ be a limit point of $A$. A number $L$ is said to be the limit of $f$ at $a$ (written $\lim_{x \to a}f(x) = L$) if for any given $\epsilon > 0$ there is a $\delta > 0$ such that $|f(x) - L| < \epsilon$ whenever $x \neq a, x \in A, |x - a| < \delta$.*

~~Then the function $f$ in question has a limit at $x = 0$ and the limit is clearly equal to $2$ as explained in the very nice answer from user @marty cohen.~~

**Update**: Thanks to the user @zhw who pointed out the flaw in the answer given by marty cohen (which I was unable to detect from a cursory glance of his answer). This incident goes on to show the kind of subtle mistakes which can be made if we are not observant enough. The given function does not tend to a limit even if we take into account the second definition of limit.

*The fact that $e^{-1/x^{2}} \to 0$ as $x \to 0$ much faster than any power of $x$ does not imply that it tends to $0$ much faster than any function of $x$.* We can see that the given function can be written as $$f(x) = 2\cdot\frac{\sin^{2}(1/(x + e^{-1/x^{2}}))}{\sin^{2}(1/x)}$$ and let's put $z = e^{-1/x^{2}}$ so that $$f(x) = 2\frac{\sin^{2}(1/(x + z))}{\sin^{2}(1/x)}$$ Then $$f(x) - 2 = 2\cdot\frac{\sin^{2}(1/(x + z)) - \sin^{2}(1/x)}{\sin^{2}(1/x)} = -2\frac{z}{x(x + z)}\cdot\frac{\sin 2c}{\sin^{2}(1/x)}$$ (via MVT) where $c$ lies between $1/x$ and $1/(x + z)$. Now note that the factor $\sin 2c$ oscillates between $-1$ and $1$.

The factor $$g(x) = \frac{z}{x(x + z)}\cdot\operatorname{cosec}^{2}(1/x)$$ does not tend to $0$ as it might appear from the presence of $z = e^{-1/x^{2}}$. The reason is that function $h(x)$ which is reciprocal of $g(x)$ is continuous everywhere except $x = 0$. And we can see that $$h(x) = \frac{1}{g(x)} = x(x + z)e^{1/x^{2}}\sin^{2}(1/x)$$ and $h(x)$ vanishes at points $x = 1/n\pi$ and by continuity takes arbitrary small values as $x \to 0$. Hence the function $g(x)$ is unbounded as $x \to 0$ and because of the term $\sin^{2}(1/x)$ it oscillates infinitely. It follows that the overall expression $f(x) - 2$ oscillates infinitely as $x \to 0$.

What we learn from the above is that *although $e^{1/x^{2}} \to \infty$ much faster than any power of $1/x$ as $x \to 0$, its growth can be substantially reduced by adding a factor $\sin^{2}(1/x)$ because this factor vanishes many times as $x \to 0$ and it is continuous. And therefore the expression $e^{-1/x^{2}}\operatorname{cosec}^{2}(1/x)$ (which is crucial to this question) is unbounded as $x \to 0$ and oscillates infinitely.*

BTW you don't need to construct such complicated examples to get to a function where Taylor series and L'Hospital's rule are not applicable. A simple limit $\lim_{x \to 0}x\sin(1/x)$ also defeats these techniques and is handled very simply via Squeeze theorem.