I can hear the stress in your voice as though you were right in front of me, speaking.
The first point that comes to my mind is: It is not what happens to us that brings us stress, it's what we do in response, which counts. In other words, people will do behaviors throughout our lives, which reflect their own truths. In this case, your friends have invited you to their wedding. Although you no longer feel as close to them, they wanted to include you at their special occasion. (Their decision may be for a variety of reasons; They may not feel as close as they once did to you either, but perhaps they want to honor the past friendship you all shared.) In any event, they chose to invite you.
Your job now is to decide if you will go! In making that decision, you have the right to take into account all of your own circumstances (the date, cost, time involved, your work commitments,how you will feel about being there or not being there, etc.) Whether you go only for the ceremony, or skip the entire event, is completely up to YOU. As long as you make the decision relative to what makes sense for you, you will not make the wrong decision.
Once you begin to factor in what you believe others will think about you, or how they will perceive your decision/actions, you're on a slippery slope.It is not appropriate to make decisions based on "how it looks" to others. Those others are not walking in your shoes! What's right for someone else may not be right for you and vice verse.
After you've made your decision, you do not owe anyone a lengthy dissertation about how you came to your conclusion or on what basis. It's clear to me you are torn. If this next sentence sounds like it reflects how you feel, I suggest you say something like, "I wish I could accept your gracious invitation, but instead I need to decline". (Period. End of statement.)
As far as a gift is concerned,again be aware that no one has any right to tell you what to do. A gift is a way to share in the excitement and celebration and demonstrate your happiness for the couple. Therefore, I don't believe it should be tied to whether or not you attend the wedding. Whether the couple has a wedding registry or if they let it be known they desire a monetary gift,you are under no obligation to "follow orders!" A gift should come from your heart and you should bestow a gift only because you want to. In addition,what you give (or in the case of money, how much you give) is entirely up to you and what you believe is appropriate.