I don’t think it’s a hormonal issue but if you think so, it is a good idea to check with your doctor. More likely is that you are suffering from the effects of an abusive relationship. From what you told me in your letter, there is little to nothing worth saving. This man has hurt you physically and emotionally. You deserve far better.
I suspect you cheated because you were feeling so bad about yourself that an invitation to cheat made you feel attractive and alive again. That’s not a justification for betraying your own values but it is certainly an understandable reason. I hope you will forgive yourself for grabbing onto a moment of feeling loved.
You need to get out of this relationship once and for all. You’ve spent far too much time and energy and love on it already. You have nothing to gain by trying to fix it. It’s not going to change.
You are not a total failure. You are someone who has been beaten down and undermined to the point that you have lost your self-respect and perspective. If you can’t finally leave this guy, find a domestic violence program or a therapist to help you. You need to reclaim your sense of yourself as someone who is worth being loved and cherished and cared for.
I wish you well.