Often sadness is prolonged when lonely. Being both sad and lonely is a tough mental state to break out of. Usually it is paired with depression which simply adds insult to injury.

The best way to break someone out of this condition is to talk to them and convince them to go have some fun for awhile. Usually that fun will require some added attention on your part, so be sure to free up your schedule ahead of time.