You knew you did wrong by ignoring your praying, God, the Bible, etc. and that's why you started feeling anxious and depressed. Out of sight, out of mind. When you were talking to people and dealing with your social anxiety, you were not thinking of anything besides just getting through conversations, being around people, etc. but you realized something was missing- you knew you did wrong.
Also, I'm willing to bet that you have a lot of questions about God, Jesus Christ, etc. that have yet to be answered, and it's bothering you/making you over-think and causing your brain to react in a negative way.