On using Big-O-notation to derive a limit Let's consider the following limit:
$\lim_{n \to \infty}\left(1+\frac{1}{n}\right)^{n^2}\frac{1}{e^n}=\lim_{n \to \infty}e^{n^2\cdot\ln\left(1+\frac{1}{n}\right)-n}=\lim_{n \to \infty}e^{n^2\cdot\left(\frac{1}{n}-\frac{1}{2n^2}+O\left(\frac{1}{n^3}\right)\right)-n}=\lim_{n \to \infty}e^{-\frac{1}{2}+O\left(\frac{1}{n}\right)}=e^{-\frac{1}{2}}$
Intuitively this makes sense. However, I am not sure how to write this out rigorously by using the standard rules of limits.

My attempt:
Firstly, I will try to find an upper bound of $n^2\cdot\ln\left(1+\frac{1}{n}\right)-n$ by using the Taylor expansion of $\ln(x)$ at point $1$:
For all $m>2$ there exists a constant $C$ such that for a large enough $n$ it holds:
$$\sum\limits_{k=3}^{m}\frac{(-1)^{k+1}}{kn^{k-2}}\leq \Big|\sum\limits_{k=3}^{m}\frac{(-1)^{k+1}}{kn^{k-2}}\Big|\leq \sum\limits_{k=3}^{m}\Big|\frac{(-1)^{k+1}}{kn^{k-2}}\Big|\leq C\Big|\frac{1}{n}\Big|\implies \sum\limits_{k=3}^{m}\frac{(-1)^{k+1}}{kn^{k-2}} \in\mathcal{O}(\frac{1}{n}).$$
Hence, $n^2\cdot\ln\left(1+\frac{1}{n}\right)-n\leq  C\Big|\frac{1}{n}\Big|$.
By using the monotonicity of $e^x$ we write:
$$e^{\left(-\frac{1}{2}+\sum\limits_{k=3}^{m}\frac{(-1)^{k+1}}{kn^{k-2}}\right)}\leq e^{\left(-\frac{1}{2}+C\frac{1}{n}\right)}=e^{-\frac{1}{2}}e^{\left(C\frac{1}{n}\right)}.$$
So for $n$ which are large enough we have:
$\left(1+\frac{1}{n}\right)^{n^2}\frac{1}{e^n}=e^{n^2\cdot\ln\left(1+\frac{1}{n}\right)-n}\leq e^{-\frac{1}{2}+\left(C\frac{1}{n}\right)}$ and therfore $\lim_{n \to \infty}\left(1+\frac{1}{n}\right)^{n^2}\frac{1}{e^n}\leq e^{-\frac{1}{2}}$.
This doesn't yield $e^{-\frac{1}{2}}$ as limit but only as an upper bound.
So how do I show that $e^{-\frac{1}{2}}$ is indeed the limit? Using Big-O-notation seems handwaving in this context.
EDIT
To clarify things, the expression:
$$\lim_{n \to \infty}\left(1+\frac{1}{n}\right)^{n^2}\frac{1}{e^n}=\cdots=\lim_{n \to \infty}e^{-\frac{1}{2}+O\left(\frac{1}{n}\right)}=e^{-\frac{1}{2}}$$
doesn't mean that the limit of $\left(1+\frac{1}{n}\right)^{n^2}\frac{1}{e^n}$ attains the value of $e^{-\frac{1}{2}}$ but only that the limit of $\left(1+\frac{1}{n}\right)^{n^2}\frac{1}{e^n}$, which still is unknown, has the same asymptotic behavior as $e^{-\frac{1}{2}}$. The limit of $\left(1+\frac{1}{n}\right)^{n^2}\frac{1}{e^n}$ might be $5e^{-\frac{1}{2}}$ or $6e^{-\frac{1}{2}}$ or $Ce^{-\frac{1}{2}}$ where $C$ can be any constant. To derive the exact limit one must use the standard rules of limits, as MarkViola did.
Is this correctly summarized?
 A: Using the inequalities $\frac1n-\frac1{2n^2}\le \log\left(1+\frac1n\right)\le\frac1n-\frac1{2n^2}+\frac1{3n^3}$, we assert that
$$-\frac12\le n^2\log\left(1+\frac1n\right)-n\le -\frac12+\frac1{3n}$$
Therefore, we have
$$e^{-1/2}\le\left(1+\frac1n\right)^{n^2}e^{-n}\le e^{1/2}e^{1/3n}$$
whence applying the squeeze theorem yields the coveted limit.


EDIT:  TO ANSWER THE EDIT IN THE OP
If $f(n)=O\left(\frac1n\right)$, then there exists a number $C>0$ such that for sufficiently large $n$, $|f(n)|\le C\frac1n$.
We will show that $\lim_{n\to\infty}e^{f(n)}=1$.  To do so, we will use the fact that $e^x$ monotonically increases along with the inequality $e^x<\frac1{1-x}$ for $x<1$.   Equipped accordingly, we now proceed.
Let $\varepsilon>0$ be given and let $n>C$.  Then, we can write
$$\begin{align}
|e^{f(n)}-1|&\le  e^{C/n}-1\\\\
&<\frac{C}{n-C}\\\\
&<\varepsilon
\end{align}$$
whenever $n>C\left(1+\frac1\varepsilon\right)$.  We conclude that $\lim_{n\to\infty}e^{f(n)}=1$ when $f(n)=O\left(\frac1n\right)$.  And we are done.
