I have a quickie answer for you, and a much more careful one.
Quickie: confessing, opening up to someone, talking about truths you were previously hiding, are all very similar to medical situations, where you open up an infected area to get the toxins out. Yes, it is very good for you overall, but the process itself hurts a lot, can be scary, and leaves you with a now open, and still bleeding wound that has to go through more healing.
Deeper: I am an Historian, as well as having participated in therapy sessions for myself and others. You might not appreciate it, but studying history a lot, prepared me better than most other studies, to directly understand your kind of situation.
The thing is, those of us who study a LOT of history honestly (as opposed to looking up short quotes we don’t understand completely, to use in online debates) , come to realize more than anything else, that LIFE IS DAMN COMPLICATED.
That’s the main thing you need to recognize with this. You can augment that general observation further, by recognizing that everyone sort of BUILDS THEMSELVES, as they grow and age. What I’m getting at with that, is that if you are like most of us, you “built” a public version of yourself, to more or less allow you to get things done in the world. You trained yourself to smile sometimes when you weren’t happy, because that helped you stay employed, or because you didn’t want someone you cared about to feel bad themselves, or to worry about you. When you opened up to your friend as you did, the act of doing so involved (on a conceptual level at least) tearing down the “you” that you were “operating” while dealing with that friend.
After you disassembled yourself in front of them in order to allow them to know your previously hidden concerns, you realized that you couldn’t just snap everything back together again and go back to dealing with that person the same way you had before. You must instead, design and build a NEW version of yourself, that accommodates your “reveal.”
That is what is making you so uncomfortable, more than anything else, because in a very real way, you have just had an intimate interaction with another person, and it has made the two of you STRANGERS, even as it allowed them to know you so much better. It’s confusing, but true.
You will recover, but it will take time, because you have to redesign how you conduct your life with that person and with others, due to your new awareness of yourself.
Eventually, in an overall way, you WILL feel much better for this. But the mess you have to deal with in the mean time, is going to be disruptive and uncomfortable to you until you deal with it all.
Real life is MUCH more complicated than cartoon life!