I’m sure a biologist can answer this for you in more detail … but here’s my attempt!
The energy within your body is largely found in three forms: heat, chemical and electrical. When we die the electrical energy, which is used by nerve cells to transmit signals around the body, dissipates in to heat as the electrical potentials required to maintain it are lost when the body’s cells die. The heat energy trapped within the body dissipates into the atmosphere so that your body cools to the temperature of its surroundings.
The chemical energy is maintained within the chemical bonds of the substances that make up the body. These bonds are broken either by burning during cremation, which releases the energy as heat and light, or through decomposition. The bacteria and other organisms which decompose dead organisms use the energy to grow and develop. Therefore, although the energy in our bodies can’t be put into a new baby, it does get used to generate new life and will pass on up the food chain potentially to be reincorporated into another human being.
you might want a soil scientist to answer this more fully but I’ll have a go!
Where the energy goes is dependent really on where you are put after death. If you are buried you are decomposed by microorganisms in the soil which will break down all the chemical bonds in your body. Chemical bonds are where the energy is stored in your body and the organisms feasting on the body use this energy. Another thing that can happen is the nitrate in your body is fixed in the soil, this is a vital food source for plants. So the energy in the body is used by lots of different organisms and vegetation to continue life – no energy is lost.