Unwanted thoughts may be due to either
Obsessive compulsive disorder or depression. If they are repetitive intrusive and non sensical then they might be obsessive thoughts. If you have depressed or low mood also along with worrisome thoughts you might be having depression. Some antidepressants work in both these disorders. Visit a psychiatrist and get well☺
Hello, I went through your query, yes thoughts make us who we are, good thoughts make us to achieve good giving, irrelevant thoughts make us sad, and unhappy. They are several ways to take control of this, keeping your self busy at work or spending more time with family friends and on the work you love most helps to distract you from these thoughts, daily physical exercise that makes you tired is a good remedy for milder depression or unwanted thoughts, join gym do some workout, you feel yourself better healthy and fit too, avoid smoking drinking or any other bad habits (if any), regular counselling with psychiatrist will help you make much better. Don't worry about anything concentrate on your goal. It's going to be better.