Density-functional theory based on the electron distribution on the energy coordinate