I say this as a person who has been deeply suicidal and has loved people who felt deeply suicidal. One of the people I love most in the world has dealt with a lot of depression and painful suffering due to it. I told zir that if ze had to do it, I would understand and I would forgive zir, but that I wanted the chance to say goodbye so if it ever came down to it, to please contact me first. Had that happened I would have cried, I would have asked if there was anything I could do, and if not, I would have said goodbye, and thanked them for all the good they did me and all the time they shared with me. I would not have told them what to do with their own life or demanded that they consider my feelings above their own. (I would be angry and hurt if they didn't give me a chance to say goodbye, but I would understand that it might have been too much to do that and they get my forgiveness and love no matter what)
Also, it's not fucking helpful to tell someone not to do it! Instead of making orders, ask questions! see if there is anything you can do, try to think up things to offer. Sometimes you can't help, other times little things like bringing someone a coffee or giving someone a long hug would be miraculously helpful, and you won't know if you don't offer, and most of the time I don't think a suicidal person is going to be able to come up with something that would make them feel better so think it up your own damn self.