The human brain is a pattern-matching and feedback system.
When we are processing events that occur we can use cognitive hygiene, hygiene meaning health practices, to strengthen the perception and benefits of positive events with positive feedback, and to use negative feedback on painful events the world subjects us to, such that in a more peaceful cognitive state we can resolve the negative events that reach us.
When you start with a small event and build it, it is positive feedback. A butterfly beats its wing and, in the chaos theory analogy, random effects can cause positive feedback to the magnitude of turning a wingbeat into a hurricane. Negative feedback suppresses stimuli, a beaver will increase it's industry and dam building when they hear water, until the water sound is silenced.
Some cognitive behavioural therapists believe that there are specific categories of "selftalk" subvocalisation, speaking to yourself in your mind only, that worsen negative events, perjorate benign/neutral events, or negate positive events. Searching for "cognitive distortions" will give you many categories:
Please read several sources for a more complete list of thought patterns and selftalk that leads to worsened affect (how you others perceive your mood), mood (how you feel yourself), motivation, self-esteem, sexual difficulties, etc. You are in charge of your health, no one else is, if something does not make sense do some research by yourself on "scholar.google.com" to find papers and on "Sci-hub" to read the research. Talk to your doctor about discordances in what you've read and what you experience. Find Cognitive behavioral therapy techniques that work for you, shopping around for a therapist who "Get's you" is fine, but take the bull by the horns and research in the time between appointments. My patients that do the best are always reading or trying to find better techniques, or think of techniques that help them better.
For the items listed above consider how to emotionally distance yourself from the first impression that comes with any thought. Debaters, who were taught just to win (rhetorical method) have been know to just try and upset their opponent who will then provide weaker arguments, or simply become too flustered to participate. Try and be the speaker who listens to all sources and then try and find a reasonable conclusion (dialectic method).
Write down these cognitive distortions, in brief, or just by category (mindreading x5, fortune telling x1, all-or-nothing x2) each day. By spending this cognitive effort you will positively reinforce reflective behaviour than will arrest natural thought, and in the thought gap when you're writing down, or reflecting on why this week you have more catastrophism you are stopping the unhygienic selftalk, and training yourself to stop those negative trains of thought that carry you from feel bad to feeling worse.
If just stopping and noticing that your cognitive distortions has not reduced their number, intensity, or you still feel like you believe the negative self talk, do more to break that train of thought. Wear a rubber band to snap on your wrist gently to give a negative feedback to the cognitive distortion in progress. Write down and record the cognitive distortions - you will activate motor centres, and engage a different neural pathway that may help you strengthen escape patterns in thinking.
When you have a cognitive distortion try and evaluate it. What part do you know must be true, what evidence to I have the cognitive distortion is true, then IMPORTANTLY consider what evidence there is that this may be false. You are not trying to prove, you are trying to falsify. You only need one strong piece of evidence to falsify a cognitive distortion, however proving requires an ever increasing burden of evidence finding and just think: people for centuries have wasted their lives trying to prove false theories. I have heard the sky is blue because of light scattering in oxygen, if I create a chamber of air and can predict with optic formulas that the light should scatter at a certain percent, if that formula is true it doesn't prove the theory, but it is consistent with that theory. If that degree of scattering does not happen I know that I have not reached the answer and should consider another theory to test. Do not keep making ad-hoc modifications to theory if it becomes more and more challenging to make it fit.
This will give you a headache and it will be extremely annoying, until you have developed a new way of thinking, you will spend a lot of mental energy slowing walking your neurons through a new pathway that doesn't only lead to feeling terrible. When you are tired alternate A tasks and B tasks. A tasks are your main goals for the day: Get X report done. As you get fatigued, take a rest with a B task vs video game, walk, nap, idle procrastination. My B-tasks are written in the top corner of my daily agenda and include things that I often forget, and I'll feel less burdened when they are done: Fold laundry, clean desk, sweep floor, email Mom. After a B-task I'll feel a tiny dopamine burst of accomplishment and I'm a bit more ready to keep working on an A task.
Positive feedback can send it spinning out of control or pull it out of extremes when coupled with negative feedback. Negative feedback can keep it running in a healthy range by moderating its actions. After a routine is developed with good mental health, performing any of the actions in the routine will help stimulate the brain to emulate the old pattern, maintaining mental health through conditioning.
Consider having a "X-effect" flash card or journal: write the behavioural/cognitive change you want to make and then each day you reach that goal you mark the day with a "X" shape. Start with reduction (Don't say "fuck" more than 10 times in the day, before elimination (Do not say "fuck").
Do not do any activity in bed other than intimacy with a partner and sleep. You must train yourself that when you lay in bed it is to go to sleep, not to watch TV, facebook, email, think of problems and solutions. If you cannot get up in the morning then today, the day you are reading this, go to your bed and set an alarm for 5 minutes from now. Lay with your eyes closed. When the alarm goes off, jump out of bed. Do this a couple of times. In the morning you'll find your brain feels good getting up, and lazy laying down, and the brain will help you get up because it wants to feel good. Sometimes you just have to go slow to show it the path.
The world around you is a "thermometer" for how well you're doing. If your desk is 100% tidy when you feel awesome, then look at it each morning and consider why it's messy. As I wake up each morning, I check in on my mental state -- alertness, ease of waking, how tired I am, how my body feels. Having a baseline for the day helps. If it's a change from previous days, I look for causes. If it's a positive change, I try to do that action a little more (positive feedback). If it's not, I try to not do that so much (negative feedback).
I eat a good breakfast. Blood sugar levels affect cognition significantly when they're out of norm. I'm hypoglycemic, so dietary choices are doubly important to mental functioning for me. If my blood sugar dips too low, I tend to be super emotional and if left unchecked, manifests as depression. I eat regularly though the day to maintain things.
Exercise helps release endorphins that can help stimulate peak awareness, though usually with a fall-off that leaves one a bit less energetic than baseline.
Regular exercise negatively feeds stress reactions within the body, which helps raise clarity of thought, and makes the brain react to the stimulation by jumping into the clearer thinking mode earlier.
If you can stop and believe that subvocalising "Idiot" is unhelpful after minor embarrassment, for instance, when you spat out your gum when speaking to someone you respect, and want to respect you; you will find success in cognitive hygiene.