Very good advice. It was on a birthday card mom and dad gave me in my early years. Now at 68 years I Ask Not For Whom The Bell Tolls. Still getting good advice.
My dear parents did the same when I turned 18.
I think you're mixing poets. That's John Donne, not Kipling. But good (if somewhat solemn) advice whoever the author.