Next time you are at the range practicing your swing, make sure you practice with a good attitude. A good positive attitude is something you can cultivate overtime. It's ok to get upset but when you do, step back and take a deep breathe so you don't take that negative energy into the next shot. When you practice good fundamentals along with a good attitude, they both become second nature over time. It's truly a fun way to play golf when you not only have a trustworthy swing but also a positive mindset on auto-pilot.
Practice the 2 Second Rule every time you are at the range so that it will carry over to the golf course. Whenever you have a negative feeling, be aware of it and that awareness alone will help dissolve the negative energy. Your goal is to get over the negative thought or feeling before you hit the next shot. This will be a great emotional habit where you do not carry your bad energy into the next shot.