Computational approach to the Green function in reactive scattering