4. Given that $H$ is the orthocenter of acute $\triangle A B C$, the rays $A H, B H, C H$ intersect $B C, C A, A B$ at points $D, E, F$ respectively. Let $B C=a, C A=b, A B=c$. If line segment $E F$ bisects the area of $\triangle A B C$, then $D E^{2}+E F^{2}+F D^{2}=$ ( ).
(A) $a^{2}+b^{2}+c^{2}$
(B) $a^{2}$
(C) $b^{2}$
(D) $c^{2}$
4.B.

Since line segment $E F$ bisects the area of $\triangle A B C$, and it is easy to prove that $\triangle A E F \backsim \triangle A B C$, we have
$$
\frac{S_{\triangle A E F}}{S_{\triangle A B C}}=\left(\frac{E F}{B C}\right)^{2}=\frac{1}{2},
$$

which means $E F=\frac{\sqrt{2}}{2} B C$.
Also, $\cos \angle B A C=\frac{A E}{A B}=\frac{E F}{B C}=\frac{\sqrt{2}}{2}$, and since $\angle B A C$ is an acute angle, we have $\angle B A C=45^{\circ}$.

At this point, $\angle A B E=45^{\circ}=\angle A C F$, and from the fact that points $B, D, H, F$ and $C, D, H, E$ are concyclic, we know that $\angle A D F=\angle A B E=45^{\circ}$ and $\angle A D E=\angle A C F=45^{\circ}$.
Therefore, $\angle D E F=90^{\circ}$.
Thus, $D E^{2}+E F^{2}+F D^{2}=2 E F^{2}=B C^{2}=a^{2}$.