If your friend tell you they have made a plan to harm themselves make sure that it is disabled and made safe.
Go with them and get them to give you the pills/rope/bullets/car keys/knife and put them out of reach. Leaving a few tablets to go asleep may be reasonable.