OP, I think you showing incredible resilience and grace here taking these replies on the head and accepting the reason has been identified. Even if you suspected you might be a bit wild when drunk, it still hurts for it to be concluded like this.
I will gently agree with other posters that this might be time to have a look at how drink impacts you.
I had a very close friend who had an almost identical story to yours. He was clearly loved and valued and asked to be a big part of the wedding, but completely left out of the grooms two stag do's. He approached the groom and others who he could trust, and asked for specific examples. He always considered himself a fun drunk so what had gone wrong??
The main examples given were he became way less respectful of property and surroundings when drunk, so always started lighing up his cigarettes indoors in the hired airbnb's they had all been to, back home he even sneaked off to a friends kids' bedroom (kids were away) for a sneaky fag, giggling and opening a window like no one would notice. He did things like broke glasses in the airbnb and did an exaggerated 'shushhhhhh' giggle, while shoving the pieces under a sideboard with his foot. He peed in the gardens of the airbnbs, etc. When they were walking down the street, he called out to every stranger who went past, nothing lairy- just 'Oi Oi!!!!' type stuff. They were little things, but they all added up. No one had properly said to him 'hey these things make you less fun' (Hiring an airbnb is such a good example as one person books in their name, putting their profile on the line for feedback and needing each guest to be equally respecful) so I guess at some point the friendship group just took the wimpy route of booking without him and it sounds like maybe similar happened with you.
I do personally think your friend should have had a gentle talk with you even just to break the news that at this time plans had been made without you, but it is very sensitive. When I think about my own hen do, my best friend was just given a list of who I would love to invite and I knew very little more until we all arrived at the place they had hired. Same for the couple of hen-do's I have been fortunate enough to be asked to organise. SO there is a chance your friend had not so much say in who, what, when, where, and why.
It feels horrid right now, go to that wedding with your head held high and maybe consider sticking to soft drinks just so you know you can be your best self. Easier said than done, I know.