Some have a problem with beating themselves up over thinking negatively when they are trying to stay positive, but think of it this way.
When we are cold, we do not worry about being cold. We build a fire. We work with the heat. As we gather around that fire, we enjoy the heat that is extended from it and we become warm. We build warmth and the cold naturally disappears.
As we focus on thinking positive, build the fire of positive thoughts, fill your mind and let that penetrate your being and the negative thoughts will naturally disappear.