Keep things in proper perspective.
The truth is "Most relationships don't last!"
Just about everyone has had their heart broken at least once! (Many have had their hearts broken more than once). So don't be too surprised if you let yourself down again in the future.
What you are going through just proves that you are human!
Each of us selects OUR own friends, lovers, and spouse. Having sex with your ex was YOUR choice."I almost turned 21 and intended to keep it till marriage..." You have to ask yourself "Why did you break YOUR own rule?"
You say you were "naive". However I'm sure you were aware it was NOT your wedding night when you had sex. You weren't "tricked" into thinking you were on your honeymoon.
More often than not people break their own rules because they are either tired of "being good", they believe they stand to "gain" something, or they fear losing something. We know why we are doing something when we do it. Maybe you had sex with a "hidden agenda". It's a mistake to believe sex can be used as a "lock" to hold a relationship together. The only people that feel bad after having sex are those who (expect anything beyond an orgasm).
Yes, sex can be an expression of love between two people who care deeply for one another but sex in and of itself is not what makes a relationship "special". For many people having sex when the urge strikes is the same as eating when hungry. They don't have be in love with the chef in order to enjoy the meal.
The first step to forgiving yourself is to take responsibility for your own decisions and choices. If there was no rape then you had sex because YOU wanted to have sex.
(You don't regret having sex before marriage. What you regret is the relationship did not last)
The next step is to remember that billions of us have had our share of heartbreaks and disappointments in relationships. Falling in love a 2nd, 3rd, or 4th time takes more courage than falling in love the first time. (Therefore you never want to separate your mind from your heart when making relationship decisions.)
Going forward live your life with full awareness each moment you make a decision. With time and experience we learn to make better decisions for ourselves. Be your authentic self and only do what YOU want to do. The goal is to find someone who wants what you want and believes as you do. Never settle!