“God might not want me anymore!”

Are my thoughts from me or from the Holy Spirit? What are your thoughts on the Davidic covenant in 2 Samuel 7? I’ve been struggling with drug addiction all my life. I recently failed again. I’m ashamed, and I imagine God doesn’t want anything to do with me anymore!