I haven't read any other replies so this may have already been said. It would be very surprising if you were to be hospitalized for suicidal ideation. That's a last ditch intervention. You have to have not just ideation but actual intent, means readily available, and a plan for when, how, where, etc. Inpatient costs a lot to whoever pays (insurance, taxpayers, etc.) so they don't do it for suicidality unless they feel your death is imminent.
The more honest you are the more they'll be able to give you effective help. It's scary and I know I have things I don't discuss for various reasons but if you can share this one thing with them it will help them find you the right medication. The fewer you have to try before you hit the right one the better.
As I understand it, there's no medication that addresses this symptom directly, but if it's being tripped by anxiety, which is what happens for me, addressing that might help with the frequency and intensity of the dissociation by reducing the trigger.