You probably already know that being negative doesn't help much, but sometimes you feel you can't help it.
Here's what I started practicing that began to help me out...
You must first and foremost recognize and acknowledge the feeling! If you don't it will take control of you and before you know it you'll be kicking the dog, slamming the door etc.
As you acknowledge the thought, (and before you let it build more power over you) you then regain more control and power over it. Immediately replace it with a positive thought. You can search for uplifting quotes, messages, articles, or even come to this section of the forum.
The negative thoughts will start to fade away....
Keep putting more positive thought in your mind and before you know it...You may even find yourself optimistic, enlightened, happy, or motivated. Try to think of the negative thought now and you will even see it as a small "hiccup".
As your self-consciousness increases, and you keep practicing this. It becomes easier and easier to deal with thoughts that don't serve you well.