I know it's simple, but I think it works. If you're completely stressed or feel like hell, take a step back from it all, and breathe.
Take 3 or 4 deep breathes and just forget for a while. Then, think logically about it.
In all honesty like, you know yourself better than anyone, so you will know what to do. Taking a step back and focusing on what is going on is important to understanding.