The correct equation is


H=- 1 2 g [ D V - 2H g ]2 +eg 2H g [ D V - 2H g ]<T


The parts in the brackets and the power of g are obtained by dimensional analysis (the coefficient of restitution, being a ratio of velocities, is dimensionless)

The overall signs are obtained by noting that the first part of the motion is down and the second up.