Friend flunked

My best friend flunked in his school exams and has been depressed after that. I find him sad and uninvolved with almost everything. Earlier he used to be cheerfull and talkative but now, it seems he has taken it to heart and he feels lonely.

How do I help him ?
How can I be of any use to him ?