The $H\to gg$ amplitude relevant for Higgs production via gluon fusion is computed in the four-dimensional helicity scheme (FDH) and in dimensional reduction (DRED) at the two-loop level. The required renormalization is developed and described in detail, including the treatment of evanescent $\epsilon$-scalar contributions. In FDH and DRED there are additional dimension-5 operators generating the $H g g$ vertices, where $g$ can either be a gluon or an $\epsilon$-scalar. An appropriate operator basis is given and the operator mixing through renormalization is described. The results of the present paper provide building blocks for further computations, and they allow to complete the study of the infrared divergence structure of two-loop amplitudes in FDH and DRED.