Energy dissipation in sheared dry and wet granulates is considered in the presence of an externally applied confining pressure. Discrete element simulations reveal that for sufficiently small confining pressures, the energy dissipation is dominated by the effects related to the presence of cohesive forces between the particles. The residual resistance against shear can be quantitatively explained by a combination of two effects arising in a wet granulate: (i) enhanced friction at particle contacts in the presence of attractive capillary forces and (ii) energy dissipation due to the rupture and reformation of liquid bridges. Coulomb friction at grain contacts gives rise to an energy dissipation which grows linearly with increasing confining pressure for both dry and wet granulates. Because of a lower Coulomb friction coefficient in the case of wet grains, as the confining pressure increases the energy dissipation for dry systems is faster than for wet ones.