When a child is emotionally engaged, about to go into a full-on tantrum, the best way to help is to offer a clear simple choice. This gets them back into thinking. Once the thoughts are engaged, the emotions calm down. It lifts them out of their frustration for they see they are given a bit of freedom in making the choice. Make sure the choices you give them are only two, are simple and you are happy with either one!