I'm sorry. I know I've busted your balls along the way, but you are right -- you HAVE tried, and you have faced your shortcomings bravely and given good effort. You can sleep well knowing that you fought for this, and I'm proud of your effort.
You never know what the future holds. Something like 20% of D'd couples remarry each other, and almost always the marriage is way better than before. Just strive to treat your wife with grace and compassion (while not putting up with crap behavior), as it will serve you well going forward.