Heme doesn’t usually produce energy – it carries oxygen (when it is bound to the “globin” bit to make haemoglobin). Any given haemoglobin molecule will end up binding/unbinding O2 (oxygen) many times before it is broken down, and its the O2 which is then used by the cells, in conjunction with molecules like glucose, to give cells energy.
Another interesting thing about haeme is that is contains iron, mainly in the form of Fe2+. So, oxidized iron (the first stem in forming rust!) is essential for life.