I understand that your reaction surprised you. But I want you to know it is very normal.
You and your ex spent an important period of your lives together. In many ways, you helped each other grow up and you helped each other transition from high school to college. I imagine there were times when you even talked about a future together. Then, as often happens when people go to college, your world got bigger, there were other possibilities, and you grew apart. Moving on doesn’t erase the relationship. As we grow older, we bring our younger selves with us and layer new experiences on our history.
All of this is a long way around to explaining that in the moment that your ex told you about his new love, there was a part of you that slipped back in time to when you were a couple and happy. You essentially re-experienced the relationship and thought to yourself (or rather felt to yourself), “That could have been/should have been me.” Then you caught your breath and remembered that the relationship ended and you moved on, bringing the story up to date. For some people, that whole re-enactment takes less than a second. For others, it can take a day or a week or longer to get back in balance.
Here’s the important thing: The emotional re-enactment of what might have been doesn’t mean that you should try to reclaim your old relationship and it doesn’t mean that your current relationship isn’t what it should be. (It’s like revisiting high school. Yes, it’s good to visit. And no, you don’t want to go back there.)
There’s no reason to feel bad about yourself for having a typical reaction. Congratulate your ex and put your energy into the relationship with the man who has made you very, very happy for a year.
I wish you well.