What a lucky man I was.
There's a video in which Superman dies, and his last words are "what a lucky man I was."
Those are some pretty amazing last words to have. You'd have to be very content with your life to get such last words. Most of us will probably be thinking something like "What will happen to X after I'm gone." Basically, worry and anxiety instead of contentment.
The reason is simple. If we spend our whole lives chasing X or worrying about X, then that's what we'll get on our death beds. By the same logic, if we want contentment on our deathbeds, then we'll need to spend more time being grateful and content in our lives. You really can't expect to be content at the end if you haven't practiced it during your life.