Mechanical Energy = KE + PE
PE (Potential Energy) can include more than one type of potential energy, which can be gravitational potential or spring potential for our classes.
So for our class, you can say this:
Mechanical Energy = Ek + Eg + Es
Mechanical energy is the energy associated with motion and position.
Thermal energy (heat) and dissipated energy are not included in mechanical energy.