I guess getting a temp xanax script was predicated on you having an existing relationship with a psychiatrist... but if you do they might understand and give you enough for just the weekend.
A couple years back my best friend was having a coming home party (hadn't seen him in a couple years)... I felt like I had to go but it was a couple hours away so I had to stay at his house with other people for the weekend. They were my friends from college so it's not like I would have been with strangers but I still couldn't do it (that feeling of being trapped in a social situation with no escape). I actually drove partway there then drove around in the country for like 30 minutes deciding if I should turn around or continue... eventually I turned back. I felt like a total pu**y but I just couldn't make myself do it and I didn't want to. I wrote him an email and texted him to read his email since I was suppose to be arriving in like a half hour at that point... as much as I didn't want to I laid it out on the line about how I wasn't coming because of my social anxiety issues because I wanted him to understand that I wasn't just blowing him off because he wasn't important to me. He understood and we are still good friends to this day.
The guy I'm talking about probably isn't like your friend, but if your friend respects you enough to be in the wedding party they will understand whatever your decision is and you will probably be closer for it. And if they are a jerk about it then f*** em and you get out of the wedding entirely!
Just make sure not to tell them that the other reason you don't want to be in the wedding party is because you think their wedding is a disgusting, egotistical, sh**-show of the worst kind.