An electronic phase-field crystal model is proposed where the thermodynamics of electrons are considered in a free-energy-functional formulation. The free-electron-gas system is considered initially as the noninteracting limit of the model. The excess free-energy contribution to the functional is incorporated by including Coulombic repulsions among electrons and exchange-correlation interactions. The evolution of an electron mean field is considered in the low-temperature limit using diffusive dynamics. Three-dimensional Wigner crystallization can be achieved from the model when the density of the system is lowered sufficiently. Through this approach, we are able to provide insight into topological defect formation and evolution during Wigner crystallization.