Talk to them
Have a talk when they wake up and are sober. This is dangerous behavior. Very few people intend to kill themselves with this kind of gesture, but occasionally some succeed by accident.
Your friend has a problem and needs serious intervention. Would be best if they can refer themselves to a physician.