I want to put a box around the final two lines in this
\begin{equation}
\begin{split}
\left\langle\vec{u}\right\rangle&=\frac{1}{4}\Re\left(\epsilon_0\vec{\overset{\sim}{E}}\cdot\vec{\overset{\sim}{E}}^*+\frac{1}{\mu_0}\vec{\overset{\sim}{B}}\cdot\vec{\overset{\sim}{B}}^*\right) \\
&=\frac{1}{4}\left[\epsilon_0\left(\frac{\pi\omega B_0}{\left(\frac{\omega}{c}\right)^2-k^2}\right)^2\left[\left(\frac{n}{b}\right)^2\cos^2\left(\frac{m\pi}{a}x\right)\sin^2\left(\frac{n\pi}{b}y\right)+\left(\frac{m}{a}\right)^2\sin^2\left(\frac{m\pi}{a}x\right)\cos^2\left(\frac{n\pi}{b}y\right)\right]\right. \\
&\qquad+\frac{1}{\mu_0}\left(\frac{\pi kB_0}{\left(\frac{\omega}{c}\right)^2-k^2}\right)^2\left[\left(\frac{m}{a}\right)^2\sin^2\left(\frac{m\pi}{a}x\right)\cos^2\left(\frac{n\pi}{b}y\right)+\left(\frac{n}{b}\right)^2\cos^2\left(\frac{m\pi}{a}x\right)\sin^2\left(\frac{n\pi}{b}y\right)\right. \\
&\qquad\qquad\left.\left(\frac{\left(\frac{\omega}{c}\right)^2-k^2}{\pi k}\right)\cos^2\left(\frac{m\pi}{a}x\right)\cos^2\left(\frac{n\pi}{b}y\right)\right] \\
%Box starting here
&=\left(\frac{\pi B_0}{2\left[\left(\frac{\omega}{c}\right)^2-k^2\right]}\right)^2\left[\left(\epsilon_0\omega+\frac{k}{\mu_0}\right)\left[\left(\frac{n}{b}\right)^2\cos^2\left(\frac{m\pi}{a}x\right)\sin^2\left(\frac{n\pi}{b}y\right)\right.\right. \\
&\qquad\left.\left.+\left(\frac{m}{a}\right)^2\sin^2\left(\frac{m\pi}{a}x\right)\cos^2\left(\frac{n\pi}{b}y\right)\right]+\left(\frac{\left(\frac{\omega}{c}\right)^2-k^2}{\pi\mu_0k}\right)\cos^2\left(\frac{m\pi}{a}x\right)\cos^2\left(\frac{n\pi}{b}y\right)\right]
%and ending here
\end{split}
\end{equation}
I want it to pretty much look like this
\begin{equation}
\begin{split}
\left\langle\vec{S}\right\rangle&=\frac{1}{2\mu_0}\Re\left(\vec{\overset{\sim}{E}}\times\vec{\overset{\sim}{B}}^*\right) \\
&=\frac{1}{2\mu_0}\Re\left(\frac{i\pi B_0}{\left(\frac{\omega}{c}\right)^2-k^2}\left[\left\langle\frac{-n\omega}{b}\left[\cos\left(\frac{m\pi}{a}x\right)\sin\left(\frac{n\pi}{b}y\right)\right],\frac{m\omega}{a}\left[\sin\left(\frac{m\pi}{a}x\right)\cos\left(\frac{n\pi}{b}y\right)\right],0\right\rangle\right.\right. \\
&\qquad\times\left\langle\frac{mk}{a}\left[\sin\left(\frac{m\pi}{a}x\right)\cos\left(\frac{n\pi}{b}y\right)\right],\frac{nk}{b}\left[\cos\left(\frac{m\pi}{a}x\right)\sin\left(\frac{n\pi}{b}y\right)\right],\right. \\
&\qquad\qquad\left.\left.\left.\frac{-i\left[\left(\frac{\omega}{c}\right)^2-k^2\right]}{\pi}\cos\left(\frac{m\pi}{a}x\right)\cos\left(\frac{n\pi}{b}y\right)\right\rangle\right]\right) \\
&=\frac{1}{2\mu_0}\Re\left(\frac{i\pi B_0}{\left(\frac{\omega}{c}\right)^2-k^2}\left\langle\frac{-im\omega\left[\left(\frac{\omega}{c}\right)^2-k^2\right]}{\pi a}\sin\left(\frac{m\pi}{a}x\right)\cos\left(\frac{m\pi}{a}x\right)\cos^2\left(\frac{n\pi}{b}y\right),\right.\right. \\
&\qquad\frac{in\omega\left[\left(\frac{\omega}{c}\right)^2-k^2\right]}{\pi b}\cos^2\left(\frac{m\pi}{a}x\right)\sin\left(\frac{n\pi}{b}y\right)\cos\left(\frac{n\pi}{b}y\right), \frac{-n^2\omega k}{b^2}\left[\cos^2\left(\frac{m\pi}{a}x\right)\sin^2\left(\frac{n\pi}{b}y\right)\right] \\
&\qquad\qquad\left.\left.-\frac{m^2\omega k}{a^2}\left[\sin^2\left(\frac{m\pi}{a}x\right)\cos^2\left(\frac{n\pi}{b}y\right)\right]\right\rangle\right) \\
&\fbox{$=\frac{\omega B_0}{2\mu_0}\left\langle\frac{m}{a}\sin\left(\frac{m\pi}{a}x\right)\cos\left(\frac{m\pi}{a}x\right)\cos^2\left(\frac{n\pi}{b}y\right),\frac{n}{b}\cos^2\left(\frac{m\pi}{a}x\right)\sin\left(\frac{n\pi}{b}y\right)\cos\left(\frac{n\pi}{b}y\right),0\right\rangle$}
\end{split}
\end{equation}
I've tried using \fbox, but I cannot seem to get it to span multiple lines keeping my paragraphing and tabs. Also sorry for the messy code!
=
signs?\widetilde{E}
instead of\overset{\sim}{E}
.\right]
(or\biggr]
directive at the end of the third row.