The best way is to practice getting into a certain mindset or perspective. The more you begin to see everything a certain way, the more you change.
So if you are negative, try to think positive every now and then. Meditate on some positive ideas and try your best to see the positive side of things. If you do that long enough, you will be training your mind to be more positive.