When you are feeling badly, you are also often feeling out of control. Your internal state is often a reflection of your external state; when your environment is messy, you feel messy inside. Time spent organising your space is time spent building up your sense of control and accomplishment.
Source: Self-Soothing Techniques: Distraction @ CenterSite.net: Connecting you to your community
Photo: Tidying room by Andy McDowall under Creative Commons license