OMG, I literally had the same problem last week. I knew about the event for months, but the idea of the dress stressed me enough that I ended up actually looking for dress only 3 times(I can...tolerate stores, but it's hard, and impossible to do the all-day shopping some people do without getting anxious or at least headache). Once, I set aside a whole day with no other obligations, spend an hour mentally preparing, loaded my phone with nice music, and went up and down one shopping street and check every suitable store there for few hours. Then got nice food for lunch, and relaxed at home the rest of the day. It was disappointing, since I am bigger than before, and although I'm not too big, most stores had biggest size L for the official dresses, and that was tight, but managable, and other stores had "one size fits all" that only looked good on S-M sized people.
The next searches I was really happy to have been at my best mood and least anxiety, because I went to proper stores with official dresses of high quality and those are kind of ...invasive...Meaning because it's big complex dresses with lace and zippers and ties, the shopping assistant would come in to help me get in the dress and tie it etc. (All done very tastfully and it was a woman...but still, I'm a private person). ...But I was lucky I found a dress I was happy with...
However, I worried for months: to find a dress that makes me feel good, to have proper make up and jewelry and shoes etc etc etc....
Guess what? No body cared as much as me! I mean, yes, I got few compliments on the dress. But nobody said anything about the fact that I was in sandals and no heels. Nobody commented on my weight gain(people who last saw me -30lbs ago). Nobody had anything bad to say. Some of the guests, even close family, were between elegant and casual, and that was fine too. Everyone was happy about the occasion, happy to see people they hadn't seen in a long time and generally uplifted. I had worried for months about nothing. I know, this is the reality of how anxiety works, but I hope may be you learn from my mistake:).
As others suggested, dress something you already have, or borrow something. In all likeliness, you already have enough things that you can combine into a nice decent wedding appropriate outfit.
You just need to feel comfortable and be semi-official and just look the best you can right now. And smile. I'm sure your presence and nice mood will be more appreciated than what dress you are wearing. :)