The gravitational binding energy of the Earth is $2×10^{32} J $, so the same amount of energy must have been released during the Earth's history.
According to this and this, the current internal energy of the Earth is ~ $1.5×10^{31} J$, and according to this source, the amount of heat loss due to outward radiation by the Earth during the entire lifetime of the planet is about $0.45×10^{31} J $.
So, by adding those two numbers we get the Earth internal energy + energy radiated = ~ $2×10^{31} J $, which is an order of magnitude less than what we should expect. We are also ignoring the fact that 50-90% of the current internal energy of the Earth is due to radioactive decay. So where did the rest of the energy go ?