We study a natural functional on the space of holomorphic sections of the Deligne–Hitchin moduli space of a compact Riemann surface, generalizing the energy of equivariant harmonic maps corresponding to twistor lines. We show that the energy is the residue of the pull-back along the section of a natural meromorphic connection on the hyperholomorphic line bundle recently constructed by Hitchin. As a byproduct, we show the existence of a hyper-Kähler potentials for new components of real holomorphic sections of twistor spaces of hyper-Kähler manifolds with rotating S^1-action. Additionally, we prove that for a certain class of real holomorphic sections of the Deligne–Hitchin moduli space, the energy functional is basically given by the Willmore energy of corresponding equivariant conformal map to the 3-sphere. As an application we use the functional to distinguish new components of real holomorphic sections of the Deligne–Hitchin moduli space from the space of twistor lines.