It's a HORRIBLE idea! My friend wrote a text to her brother in 2017 and she was serious. She wrote "I'm going to the train tracks to kill myself. May Jesus have mercy on my soul." And she went.
The police showed up and took her away and now since 2017 she has been forced to take MASSIVE injections of antipsychotics (court-ordered) and we are in Canada. Today, she is severely disabled due to the large doses and various antipsychotic injections and she is not the same person. When I go to hang out with her, sometimes she is a vegetable. She can't concentrate for more than five minutes.
I HIGHLY reccomend making it through this on your own and trying everything in your power to survive life without notifying police or anybody that you are going to kill yourself. Please do not do what you are considering. I know from her experience that it doesn't end well.