Background
These behaviours aren't the focus of the question, simply provided for background information. I'd appreciate it if answers focused on the main question at the end.
Sometimes I look after a child that has some mild learning difficulties. They get frustrated and angry and often don't know how to express themselves properly. This is being treated and there are active plans in place to help them.
The most common trigger is if they feel unfairly treated, sometimes they have genuine cause for this, other times it has been fair but they didn't agree. Fairness is obviously subjective.
The problem
Sometimes the resultant outburst can lead to a situation where the child becomes fixated on something such as "I want this to happen" or "I'm going to keep doing this as long as I want". This can sometimes be unsafe behaviours such as absconding and refusing to return unless a certain person picks them up (it's never the person who is with them), refusing to provide information that affects others or their own safety (say someone may have ingested something), or in rare extreme cases banging their head against the wall repeatedly.
Obviously if there's an immediate danger such as with the head banging we may have to restrain them and physically not allow them to continue what they are doing.
So the main question is: for vast majority of situations where restraint isn't appropriate, how can we break their fixation and get them to cooperate?