May I add that mass or energy are never "destroyed". It is just that matter may be destroyed, and all you have is a photon, or gamma, etc..that is a form of immense energy, and has mass=energy/c^2
–
Saurabh RajeApr 2 '13 at 12:46

@FabioF - Yes, but only if you allow energy to escape the system (light, infrared, thermal dissipation). Not suspecting you of allowing an exhaust pipe!
–
Jirka HanikaApr 2 '13 at 13:53

You have to realize that thermodynamics emerges from the bulk properties of matter, and this is seen better when one goes to the formalism of statistical mechanics. The first law of thermodynamics is the form conservation of energy takes in the thermodynamics mathematical framework which is constrained by classical physics.

As you must know from your chemistry courses, there exists the world of quantum mechanics, which is responsible for the existence of chemistry and its governing laws, another framework.

Special relativity has been validated experimentally many times over, and it tells us that mass itself is a type of energy .The law of conservation of energy, as @SWeko explains in his answer, includes the energy contained in the masses of the particles under consideration, the total energy being E=m*c^2.

In a similar manner where energy can be stored in chemical reactions, which can be released under appropriate conditions, energy is stored in nuclear reactions, of which fission and fusion are expressions.

In the realm of special relativity there is no meaning to the first law, because it does not describe nuclear reactions. Once the energy released by a nuclear reaction is taken into the equations then one can consider the thermodynamic properties of the sample resulting from fission or fusion.

Imagine that you are converting atoms of deuterium (hydrogen with one proton and one neutron per nucleus) into the most common isotope of helium, called helium-4 (two protons, two neutrons). Deuterium isn't the most common form of hydrogen in nature, but let's just keep the math simple. Two atoms of deuterium produce one atom of helium-4.

Deuterium's molar weight can be found here to be 2.0141017778. Twice that would be 4.0282035556; but helium-4 has, as per the same source, molar weight only 4.00260325415.

Where did the remaining mass of 0.02560030145 go? Photons, radiated away. If you did not allow them to escape, you could convert them back into matter of your preference and be able to verify that the mass of such matter is still 0.02560030145, assuming no other energy has escaped your lab.

Using the famous equation mentioned in sister answers, you can even use this math to convert familiar units of mass (such as grams) to units of energy (such as megawatt hours), if you prefer to keep the energy as energy, sell some of it on the power market and waste the rest during the conversion to electricity.