Often times we forget that having a relationship with God isn't about perfection, it isn't about the number of rules/laws you can keep. It's a work in progress, which means you're a work in progress.
Do not believe the lie that He doesn't love you because of what you have done. Do not believe the lie that He doesn't want you anymore. Remind yourself of His faithful love, the love that chose to die for the sin you have committed and to give you hope that simply being you is enough.
God is merciful, His presence only awaits you, so reach out to Him.