We present a generalized theoretical framework for dealing with the important issue of dynamical mass generation in Yang-Mills theories, and, in particular, with the infrared finiteness of the gluon propagators, observed in a multitude of recent lattice simulations. Our analysis is manifestly gauge-invariant, in the sense that it preserves the transversality of the gluon self-energy, and gauge-independent, given that the conclusions do not depend on the choice of the gauge-fixing parameter within the linear covariant gauges. The central construction relies crucially on the subtle interplay between the Abelian Ward identities satisfied by the nonperturbative vertices and a special integral identity that enforces a vast number of seagull cancellations among the one- and two-loop dressed diagrams of the gluon Schwinger-Dyson equation. The key result of these considerations is that the gluon propagator remains rigorously massless, provided that the vertices do not contain (dynamical) massless poles. When such poles are incorporated into the vertices, under the pivotal requirement of respecting the gauge symmetry of the theory, the terms comprising the Ward identities conspire in such a way as to still enforce the total annihilation of all quadratic divergences, inducing, at the same time, residual contributions that account for the saturation of gluon propagators in the deep infrared.