Try to put things in perspective. Chances are, as bad as things seem, someone else has it harder. The very fact that you have internet access and are literate means that you already have things that many others will never have.
Look for the good things that you can, no matter how small, and appreciate that you have them.
If that doesn't work, go for a jog round somewhere green and rural-looking.