Hey there, best thing to do is to stay calm, ask them to call the National Suicide Prevention Hotline: 1-800-273-8255 (I believe you can call this even if you're outside of the US, and i'm sure there are other similar organizations in other countries), and offer to talk to them as well.
You can also call the Suicide Hotline for advice on how to handle the situation, I've done that before.
The hotline is anonymous and calling the number redirects to a representative somewhere in the US.
Keep in mind that suicide is usually unmotivated, it's very likely that it's not your fault or anyone else's fault that this person wants to commit suicide.
Best of luck to you.