This is something I asked too. https://sanctioned-suicide.net/threads/why-does-suicidal-psychiatric-ward.23779/
To answer your question, for anyone serious it doesn't help in my opinion. Anyone doing it to seek attention or just because. It might help.
Keep in mind I never been to a ward, but based on my research it isn't a place I would want to go. It would make me want to off myself even more since you can't make money while you're in and you have no idea when you will leave. So potentially you're financially wrecked. Chances are, the problem that caused you to try to off yourself (giving it isn't mental or medical related) it is still there. And so on.
In my opinion, if you want to off yourself. There should be doctors that help you. However, you must go through a few hoops to die. Like in my case, one of the major reasons why I want to die is even with 4 degrees, a number of certs, and so on. I'm a 30 something year old that lives with their parents because it's too hard to find a job, and my autism has blown a number of interviews where I'm at. And any business I start, I can't make enough to move out. Because of this I have to deal with my drug addict sister and her kids. Many days I wake up to her yelling, her having a fit, and so on. Then to top it off. Most of my family treats me like shit. My sister lied about my parents, and keeps doing so. And yet instead of asking us, they assume she is telling the truth, and they hate us.
If there was a clinic I could go to in order to off myself, then I would go. However if I was a law maker, I would put a stipulation where you would have to go to a counselor, and try for x amount of time to rectify the problem. In my case, the they would hopefully help me get a job related to my degree, help me in the interview process, and maybe attach a financial planner to help make sure I don't slip backwards. This completely eliminating the need for me to off myself.