You're in-patient... but there's no one you can talk to?

I've been in-patient twice in the past. And neither time was a great experience. But there were people I could have talked to if I had needed to / chosen to. (I didn't any more than necessary because I wanted to get out as soon as possible & I didn't want to give them any reason to try to keep me.)
I really think talking to someone is the way to go here. But if there really is just no one you can talk to, what I would do in that type of situation would be to compassionately abide with my thoughts. I would sit with them, breathe into them, smile to them & perhaps even place a hand over my heart as a sign of lovingkindness & compassion for them. Then, after a few moments, I would let go of the particular thoughts themselves & simply continue to sit with whatever emotions underlie the thoughts be they sadness, regret, fear, whatever.
Compassionate abiding is a Buddhist practice. But there is a nice mental-health-oriented description of the practice on the web. It's possible I've linked you to this in the past. But either way, here it is now:
Relieve Distress By Allowing It: Compassionate Abiding 101 | Mindset: Perspective Is Everything
I do really think it would be best if you could talk with someone about the thoughts you're struggling with. But if there really just is no one you can talk to, perhaps the practice of compassionate abiding can be of some help. Also... here are links to 2 articles, from PsychCentral's archives, that offer tips on how to handle difficult emotions. Perhaps they may be of some help too:
How to Sit with Painful Emotions
Use This DBT Skill to Manage Your Emotions and Enhance Your Life
Please take care...