  We derive a general energy balance equation for a self-interacting boson gas
at vanishing temperature in a curved spacetime. This represents a first step
towards a formulation of the first law of thermodynamics for a scalar field in
general relativity. By using a $3+1$ foliation of the spacetime and performing
a Madelung transformation, we rewrite the Klein-Gordon-Maxwell equations in a
general curved spacetime into its hydrodynamic version where we can identify
the different energy contributions of the system and separate them into
kinetic, quantum, electromagnetic, and gravitational.
