God will show you through His word how to get out the pit.
When we pray and ask God to do something He doesn't magically do it, but He directs us how to get it done.
The mind is the battlefield. As a man thinketh in his heart so is he. Proverb23:7
Cast down evil thoughts.
Stay on the narrow path exit the broad path
Pray for conviction of the Holy spirit.
Fight the good fight of faith by casting down the enemy.
You will wear the devil out if you never give up