Even in the middle of your hurts, habits, and hang-up, God is watching over you. King David is not saying, "Surely only good things are going to happen to me!" He knew as well as anyone that bad things happen to good people.
David’s point is only that God’s goodness will follow after or pursue him. No matter how bad, evil, or difficult something seems, God will work it out for good.
It’s one of God’s great promises that He has given to believers: We know all that happens to us is working for our good—if we love God and are fitting into his plans (Romans 8:28). If you're a believer, the Bible says all things are working together for good—not that all things are good—but working together for good.
There is no difficulty, dilemma, defeat, or disaster in the life of a believer that God can’t ultimately turn toward His purpose