The first is to sincerely imagine that I will die in 10 years. That's far enough away not to require drastic changes in my life — I still want to work hard on something that I'm passionate about — but close enough to remind me not to fuck around and take these years for granted. There's also a bonus that, if I do happen to run into some bad luck and have my life expectancy cut short, then it won't come as such a shock, because I've been living like it's my last decade anyway. And if that doesn't come to pass and I live a normal life, I'll feel more gratitude for it.
The second trick I use is to imagine that reincarnation is true, but that instead of "coming back" as plankton or a bug or another person, I come back as me and relive my life, over and over again, forever. In that situation, I'd want to optimize to have a great quality of life, and spend as little of it as possible worrying about my inevitable death, or agonizing over things that have gone wrong in my past. Since my rebirth is inevitable, I'd just be dooming myself to future agonizing. It sounds morbid, but I've found that this helps me to recover a bit when I feel down about something.
Would you not throw yourself down and gnash your teeth and curse the demon who spoke thus? Or have you once experienced a tremendous moment when you would have answered him: "You are a god and never have I heard anything more divine." If this thought gained possession of you, it would change you as you are or perhaps crush you. The question in each and every thing, "Do you desire this once more and innumerable times more?" would lie upon your actions as the greatest weight. Or how well disposed would you have to become to yourself and to life to crave nothing more fervently than this ultimate eternal confirmation and seal?
Friedrich Nietzsche, The Gay Science
The problem with having a healthy lifestyle is that our lives aren't statistics. Big number theory does not apply, we only have one draw, one life and if it happens that we are one of those unlucky ones to get lung cancer while never having smoked or generally lead a healthy life then we still die within a year and there's nothing we can do about it.
Any drastic lifestyle change has costs: serious time, commitment, money and we sacrifice opportunities, things that we could be doing/enjoying instead. So my advice is: for anyone deciding to drastically change their lifestyle to a "healthier" one, do so for all the _other_ reasons (feeling fit and good, looking younger, improved relationships, having more energy, etc) but not expecting for that to increase your life span. Because then you may be up for a one nasty disappointment when cancer strikes and you are left wondering why did you do all that, why did you sacrifice so much. You better have a good answer when that happens is what I'm saying. :) (and that is true no matter what lifestyle you lead)