Mean-field approximation to the many-body S matrix