I can tell you what happens in the U.K in this scenario.
If you make statements to that effect, you will likely be put on increased suicide watch. More so, if you state that you intend to do it while in there. This will result in you being followed around even into the bathroom and losing what meagre privacy exists in there as it is. They may well end up sitting at your door with a book as they watch you. Your statement will end up documented and then likely discussed at hand over. They will discuss more than what you said, but how you said it. Your body language, tone and the context of what may have prompted it. As well as prior history. From that, they will measure the degree of observation required. Or if they are overly concerned you may be moved to a more secure ward. That certainly happens, especially if you manage to abscond from the unit and the police have to find you.
All of this will then be further discussed at some point with your Psychiatrist. This will likely extend your stay. Duty of care and liability culture is very much at work. If you were brought in under an emergency 72-hour section. Then say you intend to kill yourself in that period. That pretty much ensures that when that 72 hours lapses you will be put on a section 2. Which can last 28 days at that point. There are some exceptions, that other posters have covered.
Section 2 can at times become a section three which allows for six months which then can be renewed. Theoretically, you could stay for a very long time. That, however, is highly doubtful. Mainly because Psychiatric Units in truth just operate like Triage, not much different to an ICU. More often than not at the moment, you become settled, and dare I say it comfortable in there. That is usually when leave is offered with a mind to discharge a person soon after and free up a bed. Shortages of beds and how long of a stay is what governs a lot of who is admitted and who isn't. Along with how promptly they are discharged. Often to what is laughably meant to be 'Care in the community.' My former colleagues and I call it by its proper name, utter empty bullshit.
I am aware other countries have added issues of financial incentive and insurance agencies to drive these decisions. Rather glumly I fear that is coming here.
As for Electroconvulsive Therapy. It most definitely is practised still. Plenty of my clients had it or were undergoing it. My comment on it is, I saw it work wonders for some of my clients and wreck others... Their consent was always sought, despite being under a section. They also at any time could withdraw their consent to that treatment.
If you are detained under the mental health act and do not consent to ECT, it will not be forced. It is still fairly controversial. There are a few rare exceptions and that then depends on severity. This would not be a trivial matter though. Just being suicidal is not enough. Being catatonically depressed, and laying in your own shit, however, might be. Medication can absolutely be forced though as they are mandated to provide treatment.
Lastly, since I have seen Human Rights mentioned incorrectly often enough on this site. I will point out that it is ironically human rights law that allows you to be detained and lose your right to liberty. As this right is a limited right and can be restricted under certain criteria. Feel free to look at article 5. In this country that is covered by the Mental health act and a few other relevant acts. Other countries have their equivalency. You also have the right to appeal. Although rarely were any of my clients informed to a satisfactory degree about these rights. I am also left wondering why peoples rights, in general, are not taught anywhere meaningful? Or even as standard.
Hope that was informative.
Peace.