When I was little I often thought about what kind of old person I'd be. I saw a huge difference in the personalities of older people around me. You had the people who grew old gracefully and ones who went into silver haired life kicking and screaming. You have the kind old man in church who smiled at us kids as we walked past his yard. You had the wise woman who comforted us with wisdom from her age. On the other hand you had the grumpy old man who constantly complained about his pains and the reckless youth around him. Then you had the woman who bemoaned her vanishing youthful looks somehow never imagining that she would reach this stage in life (despite all of nature pointing to it's inevitability).
If it's true what Shakespeare said, that all world's a stage and the men and women the players in it, then there are clearly people who are better at being old than others. I remember thinking this as child; I was determined that when I get old I would be more like the kindly Mr. Miyagi (The Karate Kid) and less like Mr. Wilson (Dennis the Menace). It didn't take long for me to realize that no one consciously decides to become the bitter old man. I was determined to figure out the secret, not to eternal youth but to growing into a nice old person.
So I don't know what that secret is, other than realizing that growing old is a natural part of life and accepting each new stage of life helps keep the “bitter” at bay. Generally speaking just being aware helps a lot. You're not going to live forever. You're not going to be doing the stuff you did twenty years ago and that's okay. Try something new, try being the wise and prudent one instead of the foolish and rash one. It's actually fun, in a “I can't believe they think I know what I'm talking about” way.