I think you're heading on you're thread is all wrong.."failure"???
I think it should be "lucky "
Let me explain. Lucky your sobering back up. Lucky you realize how bad you're alcoholism has become. Lucky you still have friends that invite you to weddings.
Yes youre lucky in many ways, NOT a failure. Just keep trying.
Social settings are difficult at early sobriety. Given enough time, it will never bother or temp you again. You will look forward to going to these events sober without wanting a drink. Trust me. Just give it time.