A rigorous derivation of the density functional in the Hohenberg-Kohn theory is presented. With no assumption regarding the magnitude of the electric coupling constant $e^2$ (or correlation), this work provides a firm basis for first-principles calculations. Using the auxiliary field method, in which $e^2$ need not be small, we show that the bosonic loop expansion of the exchange-correlation functional can be reorganized so as to be expressed entirely in terms of the Kohn-Sham single-particle orbitals and energies. The excitations of the many-particle system can be obtained within the same formalism. We also explicitly demonstrate at zero-temperature the single-particle limit, the weak-coupling limit of the energy functional, and its application to homogeneous electron gas.