An automatized algorithm to compute infrared divergent multi-loop integrals