[guided]This is the heart of the proof: we must differentiate the line-integral definition of $F$ and show that the derivative equals $f$. The difficulty is that $F(w)$ is defined by integrating along a path that changes as $w$ changes — both the endpoint and the path itself vary. We need a way to express $F(w_0 + h) - F(w_0)$ as an integral along a single short segment.
This is where Goursat's lemma enters. Consider the three line segments: $[z_0, w_0]$, $[w_0, w_0+h]$, and $[w_0+h, z_0]$. Together they form the boundary of a triangle $T$ with vertices $z_0$, $w_0$, $w_0+h$. Since $D$ is convex, $T \subset D$. Goursat's lemma (which states that $\oint_{\partial T} f(z)\, dz = 0$ for any triangle $T$ contained in the domain of a holomorphic function — without any assumption of continuity of $f'$) gives
\begin{align*}
\int_{[z_0, w_0]} f(z)\, dz + \int_{[w_0, w_0+h]} f(z)\, dz + \int_{[w_0+h, z_0]} f(z)\, dz &= 0.
\end{align*}
Now $\int_{[z_0, w_0]} f(z)\, dz = F(w_0)$ and $\int_{[w_0+h, z_0]} f(z)\, dz = -\int_{[z_0, w_0+h]} f(z)\, dz = -F(w_0+h)$, so rearranging:
\begin{align*}
F(w_0 + h) - F(w_0) &= \int_{[w_0, w_0+h]} f(z)\, dz.
\end{align*}
This is the key identity: the difference $F(w_0+h) - F(w_0)$ equals the integral of $f$ along the short segment from $w_0$ to $w_0+h$. If $f$ were constant (equal to $f(w_0)$), this integral would be exactly $f(w_0) \cdot h$, since integrating a constant $c$ along a segment of displacement $h$ gives $c \cdot h$. We subtract this:
\begin{align*}
\frac{F(w_0 + h) - F(w_0)}{h} - f(w_0) &= \frac{1}{h}\int_{[w_0, w_0+h]} \bigl(f(z) - f(w_0)\bigr)\, dz.
\end{align*}
To show this tends to $0$ as $h \to 0$, we use continuity of $f$ at $w_0$. Given $\varepsilon > 0$, choose $\delta > 0$ so that $|z - w_0| < \delta$ implies $|f(z) - f(w_0)| < \varepsilon$. For $|h| < \delta$, every point on $[w_0, w_0+h]$ is within distance $|h| < \delta$ of $w_0$, so $|f(z) - f(w_0)| < \varepsilon$ on the entire segment. The ML-inequality (which states $|\int_\gamma g\, dz| \leq \sup_{\gamma^*}|g| \cdot \operatorname{length}(\gamma)$ for any contour $\gamma$) gives
\begin{align*}
\left|\frac{1}{h}\int_{[w_0, w_0+h]} \bigl(f(z) - f(w_0)\bigr)\, dz\right| &\leq \frac{1}{|h|} \cdot \varepsilon \cdot |h| = \varepsilon.
\end{align*}
Since $\varepsilon$ was arbitrary, $F'(w_0) = f(w_0)$. The point $w_0 \in D$ was arbitrary, so $F' = f$ on $D$, and $F$ is holomorphic (being the antiderivative of a holomorphic function).
Why does this argument require Goursat's lemma rather than a direct manipulation? Without Goursat, we would not know that the integral around the triangle vanishes, and we could not reduce $F(w_0+h) - F(w_0)$ to an integral along a single short segment. The triangle identity is what lets us trade a difference of integrals along two long paths (from $z_0$ to $w_0$ and from $z_0$ to $w_0+h$) for an integral along one short path (from $w_0$ to $w_0+h$), which is the segment we can estimate using continuity.[/guided]