One reason you feel the way you do may be from sheer loneliness. Even if you didn't get along, you still had each other -- and now you don't. No matter who we are, the Bible's words are still true: "It is not good for the man to be alone" (Genesis 2:18).
I suspect you also feel this way out of regret and guilt, knowing that things could have been different if you had only tried. Sadly, you can't go back and change the past; it is gone forever. Nor can you ask for your wife's forgiveness; it's too late. Perhaps your experience will help someone who is in a similar situation to face their problems and seek God's help to overcome them.
But you can seek God's forgiveness -- and that is what I urge you to do. God loves you; He loves you so much that He sent His only Son into the world to forgive you and save you. The most important step you could ever take would be to turn to Jesus Christ, confessing your sins and giving your life to Him. The Bible says, "Blessed is he whose transgressions are forgiven, whose sins are covered" (Psalm 32:1).
Then ask God to help you be less selfish and more loving to others. Don't be bound by the past, but thank God that He is with you every day, and can change you into the person He wants you to be.