Such feelings and urges are very familiar to me too, and as Debbie says, it's often just the result of an accumulation of stress and anxiety that needs somewhere to be vented and is beginning to dribble out in all sorts of strange and semingly illogical ways.
Debbie's suggestions are great. I find it really helps if I can try to pace myself through my work day and to schedule little breaks or rewards that I can work toward. Perhaps a small walk, a coffee, or a quick chat to a trusted calm friend can all help to keep the feelings in check. Is there a trusted friend or colleague in your workplace who has at least some basic knowledge about your situation? It can help to have an ally, even if you don't share a lot of detail, just having someone who has some understanding of why you might be struggling can act as a reassurance and a bit of a sounding board if you're starting to feel anxious or restless. Intervening and de-escalating the stress before it gets out of hand is definitely the key, as prevention and early management work far better than cure later on.
I do understand the often hidden stressors that lurk within a workplace, even a positive and safe one, and I applaud you for continuing to engage with work. It's important, but sometimes difficult, to do that.
Maddog