I'm not quite sure what would cause your head to hurt from thinking...are you sure it's not a stress-induced headache that comes on as a result of all the thinking? I've gotten stressed from thinking too much, and I find that the best remedy for me is to take a very short break and grab a quick drink. Also, how's your eyesight? You may be straining your eyes, in which case you may want to consider picking up a pair of reading glasses.