The top causes of you getting into this is You are constantly getting into an unresourseful state. And your mind is too much occupied with lots of thoughts and You are not being aware of your thoughts. There are Several techniques that can be used to Declutter your mind and Shift from Negative to Positive Thought patterns.
Next Steps
Start Writing Journals, everyday to see the things which are bothering you the most right in front if your eyes and start fixing it
Health Tips
further if you need external intervention, you may consult any Psychotherapist like Me to help you understand yourself better and lead you towards a sense if direction in your life.