Your friend is gone by now so it would be nice, if you see this post, to get an update from you.
Don't beat yourself up for this. Anxiety, panic and distress are nasty things to live with on a regular basis. They can certainly disrupt plans but it's not *you* ruining plans and events. It's anxiety. And lots of people have it (not to belittle your experience, just hopefully you won't feel so alone). I have the same problem. I can go for weeks or months doing really cool stuff and going really cool places, enjoying friends and even family, living life to the fullest. Then all of a sudden I hit a skid and I can't bear to leave the house. I don't want to see or talk to anyone. Just having to deal with anything makes my head feel like it's going to explode. I have had to leave my job because of what's happened. I wonder if I'm ever going to get it back under control and I constantly feel guilty for breaking off plans at the last minute sometimes, or at all.
Hopefully this helps. Hopefully you'll learn to be okay with your process. I am starting to be okay with mine. Luckily I have a lot of people in my life who either have issues of their own and so understand, or they have been adjusting to my particular situation and know what to expect.

You're not alone. And you're not messing anything up.