As a psychotherapist, I often find myself talking with clients about overthinking things. Some forethought, anticipatory planning, and problem solving is a good thing, but taken too far it becomes what we, in psychology, call "rumination." Rumination is a symptom of depression and interferes with functioning.
An effective way of dealing with rumination is to envision yourself succeeding and focusing on goal achievement rather than on all the things that can go wrong.