|MadSci Network: Physics|
P.E.=mgh is just an approximation of the potential energy of an object raised a certain distance h above the earth's surface. Anytime you see g used to represent the acceleration due to gravity, you can know that the formula is only an approximation. When dealing with an electron, gravity is such a small force as to be nearly nonexistent compared to the other forces involved. Usually, when we speak of the "potential energy of an electron," we are speaking of its electromagnetic potential energy. This potential energy is calculated using quantum mechanics. For any atom larger than Hydrogen, the calculations become extremely complex, but the solutions for Hydrogen are well known. These energy levels are described quite well at http://hyperphysics.phy-astr.gsu.edu/hbase/hyde.html The E=m0c^2 formula is for the relativistic rest energy of a particle, it has nothing to do with the electromagnetic potential energy we are usually talking about, nor is it related to the kinematic potential energy approximated by P.E.=mgh. The relativistic energy is the amount of energy that would be released if the particle were completely annihilated by an antiparticle (along with an equal amount of energy from the antiparticle).
Try the links in the MadSci Library for more information on Physics.