You are not doing this directly. You are doing this without being aware of how you are doing this. You are not aware of who you truly are, you are identified with a structure in your mind that you think you are. Your understanding of who you are is inaccurate and your understanding of how your mind works is incomplete, therefore you are unable to control your mind. If you follow enlightened guidance, you can gain the understanding of who you truly are and how to gain control of your mind. Below video contains such guidance that can be a start in this direction:

Mind Mastery: Stopping a Wild Mind

Unless the doctor you visit is able to help you in these aspects, they won’t be able to effectively help you gain control of your mind.

This video from the same source can further educate you accurately on the subject:

Psychology for the Awakened – How the Mind Works

We are here to learn. We are supposed to not have all the answers. This is like discovering the earth was not flat. Those people were not inferior and nothing was wrong with them. They just had to expand their awareness to become more accurate about life. They eventually did, and now we are able to even go to space and have greatly accurate maps, and can go anywhere we desire on this Earth, being able to navigate due to our evolved understanding and knowledge. Likewise, discovering that we are not our thoughts but thoughts are just a small part of our mind and that we are the container, the awareness that holds and creates our experience is a step we are learning to take as humankind. As we take this step, we will also gain conscious control of our thoughts and other creations.