Please take what @farleykr and @robsinatra said very seriously and act on them.
A few years ago I suffered from anxiety/depression for about a year during what I thought was the most important time of my career. I was overseas at the time, obsessively working at least 10 hours a day without breaks and usually every day of the week, drinking a bottle of wine or a couple of litres of beer a night sleeping on average 5 hours a night. I absolutely hated myself, I stopped playing and listening to any music, and actively avoiding staying in touch with family and friends.
Then one night, when I was very drunk and literally crying on the streets, I somehow decided to call my sister (whom I have already avoided talking to for months at that point) and she made me stop drinking, sleep, and seek professional help. I've always had a lot of respect for her, and I think hearing it from someone I deeply care about made and the fact that she picked up the phone when I needed someone the most made all the difference.
Anyhow! The point of the anecdote is I can't stress enough how important the things @farleykr and @robsinatra said are. Once you start feeling better you will be in a much better position to act on the advice that everyone else has kindly given about career.
As for feeling incompetent, I think a bit of that is a good quality to have because knowing and admitting what you don't know something is a very powerful skill; just don't sit on it forever (as others have said) because nothing will become better if you wallow in it.
And one last thing about dealing with incoherent thoughts: write them down. I think it's too easy to sit there to theory-craft/fantasise/make excuses in your head all-day long; so try writing them down while taking care to organise them, and be honest to yourself, as best as you can.