I hate to tell you this but if doing the right thing in a situation like that felt good everyone would do the right thing every time! People always take a pound of flesh that are bullies or victims, and we feel as bad as if we did the wrong thing with emotional residue like anger or guilt. Maybe worse for a few minutes or an hour. Doing the right thing takes courage and a mental toughness. You showed that today. And blew off steam with us not at us.
But in early sobriety, and even late after a year we can have a surprisingly short fuse that we wonder about because it is not like us. If we walk and consider we find it is us. It takes two. So relax, the residue is normal, and you passed the test today and stayed sober to boot. That should feel good and the residue from the other will fade quickly.
Yes you did the right thing in the end. It does not have to feel good right away. Immediate gratification is one of the reasons we drank bud. You do learn fast or slow but you learn.