Remembering what you've been through and how that has strengthened your mindset can lift you out of a negative brain loop and help you bypass those weak, one-second impulses to give in. Even if you're feeling low and beat down by life right now, I guarantee you can think of a time or two when you overcame odds and tasted success.
It's easy to get negative because you get beat down. You go through a few disappointments and it's easy to stay in that negative frame of mind. Choosing to be positive and having a grateful attitude is a whole cliche, but your attitude is going to determine how you're going to live your life.