Let $D$ be the unit disk in $\mathbb{C}$. I want to prove that $\text{Hol}^2(D)$, the subset of $L^2(D)$ which consists of holomorphic functions, is closed.
That is, if $(f_n)$ is a sequence of holomorphic functions in $D$ and $$\lim_{n\to\infty}\int_D |f_n|^2=\int_D |f|^2,$$ then $f$ is holomorphic.
My best guess was to use Morera's theorem and prove that for all triangles $T\subset D$, $$\int_{\partial T}f(z)\:\mathrm{d}z=0.$$
I also tried to use that for all $z\in D$,
$$f_n(z)=\frac{1}{\pi r^2}\int_{D(z,r)}f_n$$ for all $r>0$ such that $D(z,r)\in D$.
However I couldn't make any real progress.
Can anyone help me?
Note that convergence in $L^2$ is a much stronger statement that what you have written, as it asserts that,
$$ \lim_{n \rightarrow \infty} \int_D |f_n(z)-f(z)|^2 \,\mathrm{d}z = 0. $$
Morera's theorem is difficult to apply immediately, because we can't just restrict $L^2$ functions to their values on a curve. What we need is a pointwise uniform control, to apply the following result:
Proof: By local uniform convergence, we get $f$ is continuous. For each triangle $T \subset D,$ we have, $$ \int_{\partial T} f(z)\,\mathrm{d}z = \lim_{n\rightarrow \infty} \int_{\partial T} f_n(z)\,\mathrm{d}z = 0. $$ Hence Morera's theorem applies to give the result.
So it suffices to show that our sequence $(f_n)$ not only converges in $L^2,$ but also converges locally uniformly. For this note that for $D(z,r) \subset D$ and $n,m \in \mathbb N,$ \begin{align*} |f_n(z) - f_m(z)|^2 &= \frac1{\pi r^2} \left|\int_{D(z,r)} f_n(w)-f_m(w)\,\mathrm{d}w\right| \\ &\leq \frac1{\pi r^2} \int_{D(z,r)} |f_n(z)-f_m(z)|\,\mathrm{d}w\\ &\leq \frac1{\pi r^2} \left(\int_{D(z,r)} \,\mathrm{d}w\right)^{1/2} \left( \int_D |f_n(w) - f_m(w)|^2 \,\mathrm{d}w\right)^{1/2}, \end{align*} where the second last line follows by the Cauchy-Schwarz inequality. Observe that the last quantity tends to $0$ as $n,m \rightarrow \infty,$ locally uniformly in $z.$ So $(f_n)$ converges locally uniformly to some $g,$ which coincides with the $L^2$ limit $f$ (up to an a.e. identification). By the lemma, $f$ is holomorphic.