I am not certain of your exact question so I can only provide general advice. The problem area that you identified involves relationships. You believe that you are to blame for the demise of your relationships. That may or may not be true.
The fact that when a friend “makes a mistake, you get rid of them” would be problematic in virtually any relationship, romantic or otherwise. There are some mistakes that are unforgivable and would likely warrant the ending of a relationship. For instance, a new friend physically harming you would understandably warrant the ending of a relationship.
Without knowing what mistakes your friends made, it’s difficult to determine if you were correct to end the friendship. Everyone makes mistakes. Many mistakes are forgivable but there are exceptions.
Generally speaking, if you continue to end relationships after a friend makes a minor mistake, then you will be unable to establish long-term relationships. This is a problem because it is human nature to desire relationships. In the absence of meaningful relationships, you will likely be unhappy.
My recommendation is to meet with a therapist who could thoroughly evaluate your behavior in relationships. A therapist can also objectively assess how and if you are contributing to your relationship problems. The positive aspect of therapy is that you can be retrained to think differently and to act differently toward others. In other words, therapy affords you the opportunity to learn new skills and behaviors that will improve the quality of your relationships and thus your life.
Finally, you stated that you “can’t forgive yourself for the mistakes” you have made. As mentioned above, everyone make mistakes. Many of the mistakes people make stem from essentially not knowing alternative and more appropriate ways to behave. Acknowledge your mistakes, determine what led to your mistakes and make a concerted effort not to repeat them. That would be a much healthier, action-oriented approach to problem-solving than your current approach, which involves self-blame. A therapist could assist you in developing these problem solving skills. I hope that you will consider therapy. Please take care.