You had a strong emotional reaction when you learned that your ex may have had physical contact with another woman. You experienced this reaction when you realized that your behavior may have hurt your ex.
You acknowledged your mistake but took it a step further. You apparently decided that you needed to be punished for your behavior. You stopped eating, drank to the point of intoxication, and engaged in self-injurious behavior. You paid a painful price for your mistakes through self-punishment. I think you have punished yourself enough.
It is important to keep in mind that everyone makes mistakes. What is important is that you recognize and are sorry for your error in judgment. Not everyone is willing or able to admit their mistakes. Some people repeat the same mistakes over and over and never learn how to make better choices. There are also some individuals who, even when they make mistakes, are not compelled to correct their behavior. They may not want to change or they may not know how to change. From what I can tell, you want to change and this is very encouraging.
Think about it from another perspective: If a friend or a loved one made a similar mistake, would you suggest they take the same approach to the problem that you have? Would you suggest they engage in self-punishment as a way to make up for their mistake? I highly doubt you would offer that advice to your friend or a family member. I am not suggesting that you are deliberately doing this to yourself but merely pointing out that behaving this way is wrong.
You recognized your mistake, took ownership of it, and realized the pain that it may have caused your ex. You cannot change the past but you can try to make better choices in the future. Just like every other human being, you will make continue to make mistakes. We all will, because that is the nature of humanity, but I doubt you will make that specific mistake again. Learning from past mistakes and trying to correct your behavior to prevent future poor choices is all anyone can expect from you. This is the standard you should apply to yourself and to others.
You have suffered enough. Your ex has forgiven you and it is time that you forgive yourself.
I hope this helps in some way. Thanks for your question.