Employing a local formula for the electron-electron interaction energy, we derive a self-consistent approximation for the total energy of a general $N$-electron system. Our scheme works as a local variant of the Thomas-Fermi approximation and yields the total energy and density as a function of the external potential, the number of electrons, and the chemical potential determined upon normalization. Our tests for Hookes atoms, jellium, and model atoms up to $sim 1000$ electrons show that reasonable total energies can be obtained with almost a negligible computational cost. The results are also consistent in the important large-$N$ limit.