What is the meaning of the following quote?

“The best way to cheer yourself, is to cheer someone else up.”  --Mark Twain (American author of Tom
Sawyer)