Strenuous physical activity immediately afterward is the most effective cure for intense and sustained intellectual effort. If that isn't possible, then changing the mind with a completely different kind of thinking - mindless movies like comedies or action, things that don't involve thinking, just response and pleasure.
In the old esoteric metaphor, derived from Plato, the passions - the emotions - are like two horses harnessed to a chariot. The chariot driver is reason, directing and controlling the passions. If the driver isn't strong enough, the metaphor goes, the horses will go wherever they want, sometimes in different directions, and the chariot will crash. The point here is that the horses are the energy, and the driver is the will.
Intense intellectual effort, intense reasoning, without physical release, is like making the emotions, the desire you need to get anything done, push the chariot instead of pulling it. This means that reason, of course, has to steer looking behind and forward at the same time, doubling the effort and meaning that instead of guiding power that is naturally there (pulling the chariot), will has to summon power from behind - metaphorically below. Summoning from those reserves, and the concentration of steering in such a difficult way, means that you are calling upon energy reserves which contain the most primitive kinds of emotions - fear, fighting, fleeing to a secure place, anger, domination, etc. The intellectual mind doesn't care where the energy comes from, so long as it gets the job done, but when it is finished, the energy now aroused is STILL THERE. Intellectual effort alone can't exhaust it, so now you have to do something else to calm it down.
Hence the solution of intense physical effort, which ALWAYS works, or at least a complete change of what the mind is focusing on, preferably something that will make you laugh or cry or just feel really really good.
I should add that I don't recommend "relaxation" as a cure for a wound-up mind; listening to soothing music or smoking pot will usually just allow the wound-upness to continue. What is needed is an intense change of focus that is completely different from intellectual concentration.