  Processes involving only massless or massive quarks at tree-level get
corrections from massive (lighter, heavier, or equal-mass) secondary quarks
starting at two-loop order, generated by a virtual gluon splitting into a
massive quark anti-quark pair. One convenient approach to compute such two-loop
corrections is starting with the one-loop diagram considering the virtual gluon
massive. Carrying out a dispersive integral with a suitable kernel over the
gluon mass yields the desired two-loop result. On the other hand, the
Mellin-Barnes representation can be used to compute the expansion of Feynman
integrals in powers of a small parameter. In this article we show how to
combine these two ideas to obtain the corresponding expansions for large and
small secondary quark masses to arbitrarily high orders in a straightforward
manner. Furthermore, the convergence radius of both expansions can be shown to
overlap, being each series rapidly convergent. The advantage of our method is
that the Mellin representation is obtained directly for the full matrix element
from the same one-loop computation one needs in large-$\beta_0$ computations,
therefore many existing results can be recycled. With minimal modifications,
the strategy can be applied to compute the expansion of the one-loop correction
coming from a massive gauge boson. We apply this method to a plethora of
examples, in particular those relevant for factorized cross sections involving
massless and massive jets, recovering known results and obtaining new ones.
Another bonus of our approach is that, postponing the Mellin inversion, one can
obtain the small- and large-mas expansions for the RG-evolved jet functions. In
many cases, the series can be summed up yielding closed expressions.
