Scaling expressions for the free energy are derived, using the Luttinger–Ward (LW) functionalapproach in the Eliashberg framework, for two different models of the quantum critical point(QCP). First, we consider the spin-density-wave model for which the effective theory is theHertz–Moriya–Millis theory, describing the interaction between itinerant electrons and collectivespin fluctuations. The dynamics of the latter are described using a dynamical exponentz depending on the nature of the transition. Second, we consider the Kondo breakdownmodel for QCPs, one possible scenario for heavy-fermion quantum transitions,for which the effective theory is given by a gauge theory in terms of conductionelectrons, spinons for localized spins, holons for hybridization fluctuations, andgauge bosons for collective spin excitations. For both models, we construct thethermodynamic potential, in the whole phase diagram, including all kinds of self-energycorrections in a self-consistent way, at the one-loop level. We show how the Eliashbergframework emerges at this level and use the resulting Eliashberg equations tosimplify the LW expression for the free energy. It is found that collective bosonexcitations play a central role. The scaling expression for the singular part of the freeenergy near the Kondo breakdown QCP is characterized by two length scales:one is the correlation length for hybridization fluctuations, and the other is thatfor gauge fluctuations, analogous to the penetration depth for superconductors.