One of my standard sayings is "I have to grow old but I don't have to grow up".
I have spent lots of time thinking on this subject because of some of the people in my life and I think there are several key pieces to staying "young" but I think the most important is being open to new things. Listen to other people and see if you can get a new and different perception on their thoughts and outlook on life. Look hard at your own life and do the same thing. Learn to forgive yourself: we're all human, we'are all screwballs and we all make mistakes....learn from it, get over it, and get on with it.
Learn a new skill. Try a new hobby. Cut your hair different. Get your ass off the couch and hit the iron EVERY FREAKIN' DAY!! Hell, there's a million ways to approach it. Trying something new keeps you involved in life and prevents boredom. Getting bored is a killer both physically and mentally.
I think the "mid-life crisis" would vanish if we all just gave ourselves permission to be kids at heart: explore, play, laugh, learn new things, take time for yourself and give time to others.
I'm 53 and my daughter is 23. I think she and I are good friends and can talk to each other about anything under the sun because I haven't "grown up" yet. Hopefully I never will.
You rust out before you wear out.