I was afraid of telling her and she leaving anyway
Fear is so common. It seems we are all frightened. It sounds here too that as your gf has this image of you as the stable/steady type, that for you to reveal your fears and hurt around her leaving, was to disrupt this idea of who you are. But as you say yourself, that is something you would like to be, but isn't the whole truth of who you are. Which means, you have been dishonest for awhile. So who is your gf loving? Do you feel YOU as you are is not OK?
You see, neediness is such a maligned way to be, no one wants to be accused of being Needy, but in a sense we all are. We want to love and be loved fully, we want compassion and kindness and to be close to the person we love. But all these things have been reduced down to being NEEDY. I will admit my neediness. I want all those things listed above and I'm not going to apologise for them, or push them away and pretend I don't. Because when we shove away a big part of ourselves, that is when we act out in destructive ways to soothe our need. Our NEEDINESS. Which sounds like what you ended up doing.
So the very thing that could have been spoken to her about honestly from the get go, and also would have allowed her to make a decision as to whether it is for her or not, was taken away by now having to deal with your betrayal. And the end result of this is that yes, she may very well end it. Which of course could have happened if you were honest with her about your feelings in the first place, but at least then, you would know you were being authentic and yourself, and given her the opportunity to make choices for HER life and future, and whatever the outcome, known you had acted with integrity. Of course these are things you will be becoming aware of, and hindsight is 20/20, but its important to know ourselves really well, especially for any future relationships, or mending the one we are in.
It takes courage to stand up for ourselves and ask for what we want. However, as a wise friend points out - the growth really kicks in when the answer is No.
I hope some or any of this makes sense. And as we say on SI often - take what you want and leave the rest.
Take care Tennessee.