Don't buy that. It's never mostly any one person's fault. You may have erred, but trust me, she also played a significant part. And, she is also making the choice to leave. That is no one else's fault but hers. Whatever you did, (even to the point of adultery) she has a choice to forgive and remain in the marriage, which is what the Lord desires.
Prayers up. God's grace be upon you. Be penitent, humble and open to His blessings.
Thank you for your prayers. I need that.
I recognize my deeply seated fault in this and I’ve started the hard work of cooperating with God as he fixes me.