Relativity: correct way expressing energy?

The total energy of the particles will depend on the reference frame. Any particle in its rest frame has only its rest mass energy $E = mc^2$. In any other frame, it will also have energy of motion in addition to rest mass energy.

In the center of mass frame, then, if neither particle is moving the total energy would be $E_\text{cm} = (m_1+m_2)c^2$. You can then translate this to other frames if you like.

More generally, to get the total energy of a set of particles in any given frame, just add up the energies of the particles individually---the second method proposed by the OP.