What's wrong with me?

I swear on my life I love my gf yet I cheated on her, I don't understand am I just a horrible being, I don't lack empathy and I feel really bad for her I would have trauma if it did happen to me, yet I lack consideration for her in hindsight I feel so bad for her but in that moment I couldn't even take things she's done for me into consideration. I don't know what it is I'm so lost I want to be better I don't like the person I am right are there any answers as to why I did what I did? I know it was lust how do I overcome this how do I stop falling victim to temporary desires and whims I keep hurting people. What mental illness is this