We propose a new method to calculate analytically higher-order perturbative corrections and we apply it to the calculation of the two-loop virtual corrections to Higgs pair production through gluon fusion. The method is based on the expansion of the amplitudes in terms of a small Higgs transverse momentum. This approach gives a very good approximation (better than per mille) of the partonic cross section in the center-of-mass energy region sqrt[s[over ^]]≲750 GeV, where ∼95% of the total hadronic cross section is concentrated. The presented method is general and can be applied in a straightforward way to the computation of virtual higher-order corrections to other 2→2 processes, representing an improvement with respect to calculations based on heavy mass expansions.