I've been in that situation many, many times. Basically all you can do is work on something else. Do something that feels like the right thing to do (that is, something that seems like it benefits yourself or others) for a while and just pour your effort into it. Whether it's homework, work work, reading about something that interests you, or whatever, just do it for hours until you aren't thinking about anything else. Then you'll feel fine.