Mass-energy equivalence and heat capacity From Wikipedia: Einstein's mass–energy equivalence states that anything having mass $m$ has an equivalent amount of energy and vice versa, with these fundamental quantities directly relating to one another by the formula:
$$ E = mc^2$$
As a mechanical engineer, I'm used to the concept of heat capacity to determine the internal energy in a material of mass $m$ and specific heat $c_p$ (assuming the object is at rest, with no potential energy change or interactions with external fields):
$$ E = mc_p(T-T_0)$$
where $T$ is the current temperature and $T_0$ is some datum. 


*

*Einstein's equation gives an equivalent amount of energy regardless of material type. How is this possible?

*The thermal energy obtained from the heat capacity comes from the potential and kinetic energy of atoms/molecules in the material. Where does the energy in Einstein's equation come from?

*Are these two energies related? How are they related?

*Does Einstein's equation somehow include the internal energy of atoms and molecules?

 A: For our purposes it's probably useful to write Einstein's equation in terms of changes, that is$$\Delta E = c^2 \Delta m.$$
This means that a change in internal energy of $\Delta E$ is accompanied by a change in mass of $\Delta m.$ Before Einstein we thought of a body's mass as arising from the stuff inside it, atoms or whatever. Now we have to count in energy as part of the stuff, with its own mass calculable from Einstein's equation. 
I'd also like to take the liberty of rewriting your thermal equation as$$\Delta E = mc_v \Delta T.$$
By putting values for $\Delta T$ and $c_v$ and $c$ into these equations you can easily confirm that in any normal heating process, $\Delta m\ll m.$
Now to your questions...


*

*The relation between $\Delta E$ and $\Delta m$ is a general truth, a consequence of the relationship between time and space. Its independence from the nature of the material type is a little like the independence of $I=\frac{dQ}{dt}$ (current = rate of flow of charge) from the material through which the charge, $Q,$ is flowing. [The analogy is not perfect, because $I=\frac{dQ}{dt}$ is true by definition.]

*The energy change, $\Delta E,$ in Einstein's equation applied to a body being heated is the thermal energy change, the change in the sum of kinetic energies and potential energies of the particles in the material. It is not some different sort of energy. 'All' Einstein's equation is telling you in this case, is the minute change of mass that accompanies the energy change.

*The energies are one and the same.

*Indeed it does. I've tried to explain in 2. above.
[Note that the $m$ used here is a property the body itself (including its internal energy!), independent of the body's speed. It used to be called 'rest mass'.]
A: You are confusing classical mechanics and special relativity mechanics.
In classical mechanics mass is a conserved quantity and energy and momentum are conserved using three dimensional space vectors to describe particles. One gets statistical mechanics and it can be shown that thermodynamics emerges from statistical mechanics.
Heat capacity etc are all within this framework
The $m$ in $E=mc^2$ belongs to relativistic mechanics,is called relativistic mass  and is not a conserved quantity, but a function of velocity .
This is not used in particle physics, where at relativistic energies  the four vector formalism is used , where the "length" of the four vector is the invariant/rest mass of particles. In systems of particles the four vectors are added, and the mass of the system is larger then the sum of the rest masses, unless everything is at rest.

Einstein's equation gives an equivalent amount of energy regardless of material type. How is this possible?

It is because it is a mass in motion, with velocity v. It is not the conserved mass of classical physics. Given a  rest mass of $m_0$ then the relativistic mass depends only on the velocity, and is only useful for computing how much fuel will be necessary to reach a measurable percentage of the velocity of light .

The thermal energy obtained from the heat capacity comes from the potential and kinetic energy of atoms/molecules in the material. Where does the energy in Einstein's equation come from?

From whatever gives it a veloctiy increase to c, rockets for a spaceship.

Are these two energies related? How are they related?

The classical heat capacity and definition of heat are also a function of the collective motions and potentials of all the individual particles entering with their four vectors. The invariant mass of a hot object will be larger than the sum of the invariant masses of the consituents, due to the addition of their four vectors. Complicated to do it in practice :)

Does Einstein's equation somehow include the internal energy of atoms and molecules?

As it includes the sum of the four vectors of the constituents,  it does, but it is clearer to use the four vector formalism.

Solving for E, the $pc$ part is the kinetic energy, the energy carried inherently by the rest mass is the second term.
