It's the ending that's important. Not the flaws in the beginning. Strive to improve what's left of your life. He'll forgive what has passed.
Do not allow yourself to not end well from this world. You'll face severe punishment in the Hereafter. But you can turn a new leaf now and have a happy and glorious ending.