I used to teaches classes to federal law enforcement on "The Mind and Dealing With Stressful Situations" and used teach it to my students in the dojo as well.
There's an old proverb, "The mind is a wonderful servant but a terrible Master". The mind doesn't like to live in the present, instead, it likes to look back and yearn for better times, or look ahead to worry about the future. That's pretty much all it does, that's it, that's the list.
The choice of what to think about is one of our greatest virtues as people. It just takes practice, continued practice, pretty much like Martial Arts in general. What's easier is - you don't have to get up and go to the dojo on those days you tell yourself you're too tired, you can do it anywhere.
Go research. There's plenty of information available, plenty of mental exercises, games, tasks, methods. By doing so you become an observer, a researcher, a studier rather than a victim of what's inside all of our heads.
Think back to the first day you ever set foot in a dojo, that first class you took, that first time bowing in, that first time trying to properly tie your belt. It's old hat to you now. Everybody goes through the same thing, all the new guys are going through it just like you did. It's the mind trying to grasp what the hell is going on. The mind is not being your servant at this point, it's being your Master, except unlike your Martial Arts master, it's a new white belt that doesn't even have it's first bit of sweat on it, doesn't even know where to put it's thumb when making a fist. All these new feelings of inadequacy- that's the mind fk'ing with you, trying to make you it's beach. Tell it to go F itself, make it put on a proper butler's uniform.
With research and practice it gets easier every year. Honest.