Setting them to only attack enemies they can reach without moving, as mentioned above, will fix most suicidal AI problems.
Other tips: armor them up, armor is better than dodge most of the time.
Another, try to have a vehicle nearby, a bike or even a wreck will do. You can force them to disengage by hopping in/on the vehicle, they’ll beeline to a seat, ignoring their pursuers. This works even if there’s no seat, they’ll chase after you on a wheelchair.
Don’t ignore their pain/thirst/cold/etc status, it will slow them down and get them killed. Feed them, clothe them, stuff painkillers or in a pinch, liquor down their throat to numb the pain.