Question the validity of your negative thoughts. Ask yourself if they are based on facts or if you are being overly critical. Often, negative thoughts are exaggerated and not grounded in reality.
Once you identify a negative thought, consciously replace it with a positive or neutral alternative. For example, change "I can't do this" to "I will give it my best shot" or "I am capable of learning this."