We compute the regularized temperature for a spacetime foam model, consisting on S^4 instantons, in quantum gravity. Assuming that thermal equilibrium takes place with some amount of radiation - with thermal fields in the SU(2)xU(1) gauge theory - we obtain the remarkable result that the squared value of this temperature exactly coincides with the electroweak coupling constant at the energy scale of the gauge bosons W. This is consistent with the classical ADM result that the electrical charge should be equal to its finite gravitational self energy.