Consider the amount of mechanical work done on a charge in an EM field. Show that rate of mechanical work done ($\dfrac{du_{mech}}{dt}$) produces a statement of energy conservation given by:

$\dfrac{du_{mech}}{dt} + \dfrac{du_{em}}{dt} = - \nabla \cdot \mathbf{S}$

where $u_{em} = \dfrac{1}{2} \left(\epsilon_0 E^2 + \dfrac{1}{\mu_0}B^2\right)$ and $\mathbf{S} \equiv \dfrac{1}{\mu_0} \mathbf{E} \times \mathbf{B}$.

Explain how this statement applies to the energy stored in a capacitor (consider the electromagnetic fields as the capactior charges up).