I've had that realization lately. It's given me motivation to stop, but I still get the "f_k it's" and slip up, and I still get stressed and forget to use the skills I've learned along the way. But overall I'm doing much better.
I think we're given these challenges because our purpose in life is to overcome them.