You asked this question two days ago and I apologize for taking some time to respond, but I wanted to reflect on it and answer it from a truthful, honest place rather than quickly rush out a response.
If I was approached by a student who was suicidal, I would immediately put them in contact with people who are in a position to help - our guidance office, our school nurse and of course, his or her parents. Schools have a whole system in place for this kind of thing and my tendency is to rely on those systems to give students the best help they could receive. I’m not a doctor or a psychologist.
However… I suspect what you might be asking is how I would deal with it “in the moment” rather than the chain of command I’m compelled to go through by my position.
I had a miserable time in high school. Or rather, I created miserable circumstances for myself and reacted to them in the most awful ways possible. I was suicidal. I spent some time in a hospital my senior year, dealing with those feelings. In a circumstance like the one you propose, I would explain I have intimate experience withe the feelings that student is going through and I would likely offer my perspective on them, along with the assurance that even though I work in a high school, even though I love my job as a teacher… I’m not naive. I know that for most of my students, high school sucks. I’d want them to know that life gets SO much better after high school, it’s amazing. It’s AMAZING.
…that’s what I do. Speaking frankly, that’s what I have done when I’ve had to counsel a teenager who’s dealing with those issues in a public way. Honestly though, if a student is expressing suicidal tendencies in a big, bad way… if a student is seeking help from me… I take that as a sign that deep down somewhere, they recognize they have a problem and they need help. I would endeavor to be as supportive as I could be and let the student know they are not alone in their experiences, while working to get them the help they need.