Yes, you can get out of this pit (as you call it)—and God wants to help you get out of it. Your experience can be that of the psalmist, who wrote, "He lifted me out of the slimy pit, out of the mud and mire; he set my feet on a rock and gave me a firm place to stand" (Psalm 40:2).
The key is to stop trying to convince yourself that God loves you—and accept the fact that He actually does! Perhaps the most important thing I can say to you is this: God loves you just as you are. He knows all about your past, and He also knows that because of it you can't imagine God loving you. But He does! Don't trust your feelings; they will mislead you every time. Instead, trust what God has promised us in His Word, the Bible.
You see, God doesn't love us because of what we are; He loves us in spite of what we are! In other words, we don't have to become perfect before God will love us. If that were the case, He wouldn't love anyone, because (as the Bible says) "all have sinned and fall short of the glory of God" (Romans 3:23).
How do I know God loves us? I know it because He sent His only Son into the world to die on the cross for our sins. Think of it: Every sin you ever committed was placed on Christ, and by His death He took them away. Don't doubt God's love for you any longer, but by faith invite Christ to come into your heart today.