[proofplan]
First choose the subsequence of indices that realizes the energy liminf when an energy bound is part of the assertion; this prevents the compactness subsequence from losing the desired scalar inequality. On that subsequence, use reflexive weak compactness in the two $L^2$ spaces and Banach-Alaoglu weak-star compactness in $L^\infty(0,T;H)$ to obtain weak limits. The [weak derivative](/page/Weak%20Derivative) relation is closed under these convergences, so the weak limit of $u_m'$ is the time derivative of the weak limit of $u_m$. The assumed limit-identification property and the strong convergence of $f_m$ then pass the variational identity to the limit, and lower semicontinuity transfers the energy inequality.
[/proofplan]
[step:Choose the scalar liminf subsequence before applying compactness]
If no energy assertion is being used, set $M:=\mathbb N$. If the energy assertion is being used, choose a strictly increasing map $k:\mathbb N\to\mathbb N$ such that
\begin{align*}
\lim_{j\to\infty} c_{k(j)}=\liminf_{m\to\infty}c_m
\end{align*}
after passing to a further subsequence if necessary. This is possible by the definition of the limit inferior. Since
\begin{align*}
\liminf_{m\to\infty}c_m\le c,
\end{align*}
we may and do run the compactness argument along this index set when proving the final energy conclusion. To avoid double notation, relabel the chosen subsequence as $(u_m)_{m\in M}$.
[/step]
[step:Extract weak and weak-star limits from the uniform bounds]
The spaces $L^2(0,T;V)$ and $L^2(0,T;V^*)$ are reflexive Hilbert spaces. By reflexive weak compactness, the uniform bound gives a subsequence and functions
\begin{align*}
u\in L^2(0,T;V)
\end{align*}
and
\begin{align*}
w\in L^2(0,T;V^*)
\end{align*}
such that
\begin{align*}
u_m\rightharpoonup u\quad\text{in }L^2(0,T;V)
\end{align*}
and
\begin{align*}
u_m'\rightharpoonup w\quad\text{in }L^2(0,T;V^*).
\end{align*}
Since $H$ is a separable [Hilbert space](/page/Hilbert%20Space), the standard Bochner duality identification gives
\begin{align*}
L^\infty(0,T;H)=(L^1(0,T;H))^*
\end{align*}
through the pairing
\begin{align*}
U(\Psi)=\int_0^{\mathsf T} (U(t),\Psi(t))_H\,d\mathcal L^1(t).
\end{align*}
The uniform $L^\infty(0,T;H)$ bound and the [Banach-Alaoglu theorem](/page/Banach-Alaoglu%20Theorem) therefore give, after passing to a further subsequence,
\begin{align*}
u_m\overset{*}{\rightharpoonup}\tilde u\quad\text{in }L^\infty(0,T;H)
\end{align*}
for some $\tilde u\in L^\infty(0,T;H)$.
It remains to identify $\tilde u$ with $u$. Let $\Psi\in L^2(0,T;H)$, and define the bounded linear functional $F_\Psi:L^2(0,T;H)\to\mathbb R$ by
\begin{align*}
F_\Psi(z)=\int_0^{\mathsf T} (z(t),\Psi(t))_H\,d\mathcal L^1(t).
\end{align*}
The continuous embedding $V\hookrightarrow H$ implies $u_m\rightharpoonup u$ in $L^2(0,T;H)$, hence
\begin{align*}
F_\Psi(u_m)\to F_\Psi(u).
\end{align*}
The weak-star convergence in $L^\infty(0,T;H)$ gives the same convergence to $F_\Psi(\tilde u)$ for every $\Psi\in L^2(0,T;H)\subset L^1(0,T;H)$, because $T<\infty$. Thus
\begin{align*}
\int_0^{\mathsf T} (u(t)-\tilde u(t),\Psi(t))_H\,d\mathcal L^1(t)=0
\end{align*}
for every $\Psi\in L^2(0,T;H)$. Taking $\Psi=u-\tilde u$ gives $u=\tilde u$ in $L^2(0,T;H)$, and therefore $u\in L^2(0,T;V)\cap L^\infty(0,T;H)$.
[/step]
[step:Identify the weak limit of the derivatives as the derivative of the weak limit]
Let $v\in V$ and let $\eta\in C_c^\infty(0,T)$. Define the test map $\Phi_{v,\eta}:(0,T)\to V$ by
\begin{align*}
\Phi_{v,\eta}(t)=\eta(t)v.
\end{align*}
Then $\Phi_{v,\eta}\in L^2(0,T;V)$. Since $u_m'$ is the weak time derivative of $u_m$,
\begin{align*}
\int_0^{\mathsf T} u_m'(t)(v)\eta(t)\,d\mathcal L^1(t)=-\int_0^{\mathsf T} (u_m(t),v)_H\eta'(t)\,d\mathcal L^1(t).
\end{align*}
The left-hand side converges to
\begin{align*}
\int_0^{\mathsf T} w(t)(v)\eta(t)\,d\mathcal L^1(t)
\end{align*}
by [weak convergence](/page/Weak%20Convergence) in $L^2(0,T;V^*)$. The map $z\mapsto (z,v)_H$ is a bounded linear functional on $V$, because the embedding $V\hookrightarrow H$ is continuous. Hence the right-hand side converges to
\begin{align*}
-\int_0^{\mathsf T} (u(t),v)_H\eta'(t)\,d\mathcal L^1(t)
\end{align*}
by weak convergence in $L^2(0,T;V)$. Therefore
\begin{align*}
\int_0^{\mathsf T} w(t)(v)\eta(t)\,d\mathcal L^1(t)=-\int_0^{\mathsf T} (u(t),v)_H\eta'(t)\,d\mathcal L^1(t).
\end{align*}
This is the distributional definition of the weak time derivative, so $w=u'$ and $u'\in L^2(0,T;V^*)$.
[guided]
We must prove that the weak limit $w$ of the approximate derivatives is not merely an unrelated element of $L^2(0,T;V^*)$, but is exactly the weak time derivative of the weak limit $u$. The definition of weak time derivative is tested against a vector in the spatial space and a smooth compactly supported scalar function in time. Fix $v\in V$ and $\eta\in C_c^\infty(0,T)$, and define
\begin{align*}
\Phi_{v,\eta}:(0,T)\to V
\end{align*}
by
\begin{align*}
\Phi_{v,\eta}(t)=\eta(t)v.
\end{align*}
Because $\eta$ is smooth with compact support and $v\in V$, this map belongs to $L^2(0,T;V)$.
For each $m$, the assertion that $u_m'$ is the weak time derivative of $u_m$ means
\begin{align*}
\int_0^{\mathsf T} u_m'(t)(v)\eta(t)\,d\mathcal L^1(t)=-\int_0^{\mathsf T} (u_m(t),v)_H\eta'(t)\,d\mathcal L^1(t).
\end{align*}
The left-hand side is the value of the bounded linear functional on $L^2(0,T;V^*)$ determined by $\Phi_{v,\eta}$. Since $u_m'\rightharpoonup w$ in $L^2(0,T;V^*)$, it converges to
\begin{align*}
\int_0^{\mathsf T} w(t)(v)\eta(t)\,d\mathcal L^1(t).
\end{align*}
For the right-hand side, the continuous embedding $V\hookrightarrow H$ gives a constant $C_{VH}>0$ such that $\|z\|_H\le C_{VH}\|z\|_V$ for every $z\in V$. Hence the map $z\mapsto (z,v)_H$ is bounded on $V$, since
\begin{align*}
|(z,v)_H|\le \|z\|_H\|v\|_H\le C_{VH}\|v\|_H\|z\|_V.
\end{align*}
Thus $z\mapsto -\int_0^{\mathsf T} (z(t),v)_H\eta'(t)\,d\mathcal L^1(t)$ is a bounded linear functional on $L^2(0,T;V)$. The weak convergence $u_m\rightharpoonup u$ in $L^2(0,T;V)$ therefore gives
\begin{align*}
-\int_0^{\mathsf T} (u_m(t),v)_H\eta'(t)\,d\mathcal L^1(t)\to -\int_0^{\mathsf T} (u(t),v)_H\eta'(t)\,d\mathcal L^1(t).
\end{align*}
Passing to the limit in the weak derivative identity yields
\begin{align*}
\int_0^{\mathsf T} w(t)(v)\eta(t)\,d\mathcal L^1(t)=-\int_0^{\mathsf T} (u(t),v)_H\eta'(t)\,d\mathcal L^1(t).
\end{align*}
This holds for every $v\in V$ and every $\eta\in C_c^\infty(0,T)$, which is precisely the definition that $w$ is the weak time derivative of $u$. Therefore $w=u'$ in $L^2(0,T;V^*)$.
[/guided]
[/step]
[step:Pass to the limit in the variational identity]
Apply the limit-identification hypothesis to the subsequence obtained above. After passing to a further subsequence, not relabeled, we have, for every $\varphi\in L^2(0,T;V)$,
\begin{align*}
\int_0^{\mathsf T} a_m(t;u_m(t),\varphi(t))\,d\mathcal L^1(t)\to\int_0^{\mathsf T} a(t;u(t),\varphi(t))\,d\mathcal L^1(t).
\end{align*}
Fix $\varphi\in L^2(0,T;V)$. Since $u_m'\rightharpoonup u'$ in $L^2(0,T;V^*)$,
\begin{align*}
\int_0^{\mathsf T} u_m'(t)(\varphi(t))\,d\mathcal L^1(t)\to\int_0^{\mathsf T} u'(t)(\varphi(t))\,d\mathcal L^1(t).
\end{align*}
Since $f_m\to f$ strongly in $L^2(0,T;V^*)$, the [Cauchy-Schwarz inequality](/theorems/432) for the duality pairing gives
\begin{align*}
\left|\int_0^{\mathsf T} (f_m(t)-f(t))(\varphi(t))\,d\mathcal L^1(t)\right|\le \|f_m-f\|_{L^2(0,T;V^*)}\|\varphi\|_{L^2(0,T;V)}.
\end{align*}
The right-hand side tends to $0$, so
\begin{align*}
\int_0^{\mathsf T} f_m(t)(\varphi(t))\,d\mathcal L^1(t)\to\int_0^{\mathsf T} f(t)(\varphi(t))\,d\mathcal L^1(t).
\end{align*}
Passing to the limit in the approximate variational identity gives
\begin{align*}
\int_0^{\mathsf T} u'(t)(\varphi(t))\,d\mathcal L^1(t)+\int_0^{\mathsf T} a(t;u(t),\varphi(t))\,d\mathcal L^1(t)=\int_0^{\mathsf T} f(t)(\varphi(t))\,d\mathcal L^1(t).
\end{align*}
Since $\varphi\in L^2(0,T;V)$ was arbitrary, this is the limiting variational identity.
[/step]
[step:Transfer the lower semicontinuous energy bound along the same subsequence]
Assume now that $\mathscr E(u_m)\le c_m$ and $\liminf_{m\to\infty}c_m\le c$. In the first step we chose the index set before compactness so that, along the subsequence used throughout the proof,
\begin{align*}
\lim_{m\to\infty}c_m=\liminf_{j\to\infty}c_j\le c.
\end{align*}
The extracted subsequence satisfies
\begin{align*}
u_m\rightharpoonup u\quad\text{in }L^2(0,T;V)
\end{align*}
and
\begin{align*}
u_m\overset{*}{\rightharpoonup}u\quad\text{in }L^\infty(0,T;H).
\end{align*}
By the assumed lower semicontinuity of $\mathscr E$ with respect to these two convergences,
\begin{align*}
\mathscr E(u)\le \liminf_{m\to\infty}\mathscr E(u_m).
\end{align*}
Using $\mathscr E(u_m)\le c_m$ for every $m$ on this same subsequence gives
\begin{align*}
\liminf_{m\to\infty}\mathscr E(u_m)\le \lim_{m\to\infty}c_m\le c.
\end{align*}
Therefore $\mathscr E(u)\le c$. This proves the compactness, the limiting variational identity, and the stable energy inequality for one coherently chosen subsequence.
[/step]