If you understand what sin is, then you should know that you need forgiveness. Sin is a moral affront to a holy God. It’s falling short. It’s missing the mark of what He wanted for us. We are sinners by birth, by nature, by choice, and by practice. We have offended God and because He is just, He must punish sin. And we deserve punishment! Yet, God loves us. Pastor Adrian Rogers says, “No one has ever sinned themselves beyond the love of God. Sin is not just breaking God’s laws; it is breaking His heart.”
If you are truly asking how you can know Jesus, then you need to take a look in the mirror (See James 1:22-25). You cannot confess to God what you will not admit to yourself. Before you can accept Jesus as your Lord and Savior, you have to look at your sin and see it's ugliness before a perfect and holy God. Confess your sin and forsake it. Turn from the mirror where you saw your sin back to a life in which you forsake that sin. There is no repentance without brokenness. Jesus died on your behalf so that you could live for eternity in Heaven with a God who loves you and wants to forgive you. Sin cannot win. Faith cannot fail. The fact that a holy, perfect God would choose to love you and forgive you and send His Son to die for you should have you praising Him all the more.
You need not live in constant regret. Once you have confessed and turned from your sin and accepted Jesus as both Savior and Lord, you will not want to continue sinning; you will want to live a life of obedience before God because you love Him.