Context. Conservation properties of magnetic helicity and energy in the quasi-ideal and low-β solar corona make these two quantities relevant for the study of solar active regions and eruptions. Aims. Based on a decomposition of the magnetic field into potential and nonpotential components, magnetic energy and relative helicity can both also be decomposed into two quantities: potential and free energies, and volume-threading and current-carrying helicities. In this study, we perform a coupled analysis of their behaviors in a set of parametric 3D magnetohydrodynamic (MHD) simulations of solar-like eruptions. Methods. We present the general formulations for the time-varying components of energy and helicity in resistive MHD. We calculated the...