Besides that, maybe this is a burnout? If so, there have been several threads on how to tackle it on Ask HN. Maybe some of them can help. If it is burnout, one of the best ways to tackle it is to take a hobby in a field completely unrelated to tech. It should be something in which you can see tangible results/finished item in a few hours of work. That can help you calm your nerves, give you the euphoria of having a completed project on hand and serve as a good diversion in general. Breaking the constant worry about the current career and focusing on something completely unrelated might also yield a breakthrough insight on what you actually want from your current career, which you can translate to actionables.