Your thoughts are not you. Your internal judgments about your thoughts will often be inaccurate. And neither your thoughts nor your judgments reflect your value as a person.
So if you're thinking negative thoughts about your writing or your creative endeavors, keep in mind that those internal judgments are at worst wrong and at best irrelevant. All they do is sap your motivation and interfere in your creative process.
But how do I stop myself from thinking? How can you tell your mind to stop putting out thoughts?
Wrong question. You can't. You're a human being, and humans--usually--think. Instead of trying not to think, identify the thoughts you have that are judgmental. Single them out, and recognize and accept that your mind and your inner critic are not the best judge of your own work. If this doesn't enable you to discard your judgmental thoughts, at least it will help you view those thoughts with suspicion.
Being a writer is suffering enough. Don't compound your suffering by believing your own lies about your ability.
Look, it doesn't matter whether you're a bad writer or not. And it matters even less if your brain thinks you're a bad writer. Just keep practicing. You'll get there.