For me, trying to focus to get peace in my life and stress myself out less is helping after a long time, a psychologist can definitely help here, and looking back on this period of my life i wish sooner i would have spoken to one..
For me the fear of failure in the end, which i did suspect ,was not the cause but a symptom of another issue i had which was causing a lot of stress. this stress n turn caused fears and other things to creep into my mind.
All the best to u man, hope you find yourself again. Know it's perfectly normal for any human to go through such periods in their life. it's normal :) don't worry, and if you feel it will help don't hesitate to seek professional opinions / advice / help, generally it will help a lot in getting things straightened up in your life faster than on your own energy.