I think you are going through a cycle of self doubt and becoming self critical which could have started from certain critical events in your life. Somewhere the confidence in oneself takes a hit and you feel that you are a failure and start dwelling in the negative self. This negative loop will obviously not allow you to focus or concentrate on the immediate needs.
Next Steps
I would suggest you immediately consult a psychologist and try to get helped to get rid of your blocks
Health Tips
Do not give in to hasty thoughts or decisions. since your life is more precious than anything else.