Been there done that. Either:
1. Get up, walk away and go do something entirely different for a few hours -- read the paper, watch TV, take a walk, do something that distracts you -- then come back later near the close of the market -- but give yourself a few hours at least, or
2. Quit...