You may be seriously considering suicide and yet not want to tell a therapist, because you fear landing in a mental hospital.
If you go to a therapist or psychiatrist and tell them you are seriously thinking of killing yourself, that does not necessarily mean you will be hospitalized. Hospitals are very strict these days about who they admit, and insurance companies are equally strict about covering a hospital stay. Some people joke that it is harder to get into a mental hospital than Harvard University.
Suicidal thoughts are not usually enough to warrant psychiatric hospitalization for adults. Instead, you would need to be in imminent danger (or in some states substantial danger) of trying to kill yourself. This generally means you are intent on acting very soon on your suicidal wishes. Perhaps you already have a plan on how you would kill yourself, you have whatever you need to carry out that plan, and you have some intent to follow through on that plan very soon.
If so, then yes, hospitalization would almost certainly be necessary. If you do not consent to be hospitalized (that is, you will not voluntarily admit yourself), then yes, a mental health professional would need to intervene to get you to a safe place. The reason for this is that serious suicidal intent is almost always temporary, as long as the person stays alive. Consider that even among people who attempt suicide and survive, more than 90% do not go on to die by suicide.
So, if you are thinking of killing yourself but do not intend to act on those thoughts any time soon, then a mental health professional most likely will not try to have you hospitalized. Instead, they will work to understand your reasons for wanting to die, to help you feel better, and to build up your coping skills.
If you a serious danger to yourself, however, then every effort will be made to keep you safe until the crisis passes and you are safe to be out on your own again.