Relaxation of diatomic molecules by isotropic collisions: application to depolarizing collisions of CS by He atoms