I am familiar with the racing thoughts problem too. One thing you can do is whenever you feel the situation is getting out of hand is to consciously try to stop all the crazy stuff your brain is being flooded with. Once I even set myself a limit - not to think of anything after 4 pm when I'm starting to get tired at work. It may be difficult or even boring for someone who's fond of questioning and analyzing, but helps. But the truth is that all this thoughts racing usually this is a way to avoid some unpleasant, anxiety provoking situation (turning 31 in your case).