The first time it happened we were grocery shopping, I took her to the play area for children but then I noticed how not-clean the toys were and at the time there was a breakout of measles going around so I had been avoiding playgrounds and such, anyway when I told her we were going back to her dad and I was taking her away from the play she freaked out and got super upset the entire store could hear her, I felt so bad and overwhelmed with emotion. I spoke with her calmly and took her outside, nothing I was saying was rational for her I just did my best to comfort her, when went back inside she was still upset but these 3 sweet girls came up and spoke with her and they really helped calm her, she was okay after that. Later my husband had looked up on how to handle toddler tantrums and he said pretty much what I did was how to go about which made me feel a lil better but my nerves were still so shot from the experience.
1. Removing the child from the place of tantrum. Bringing them into a different environment allows them to shift their perspective and not be caught in a loop where it happened.
2. Explaining the situation to them doesn't do much, they won't rationalize, instead it is best to talk about their emotions teaching them words of feelings so in the future they can better express themselves with words.
Something else we do that's not really part of the 'official' guide and it's just a rule for us, we never buy her anything from the place she has the tantrum in the same day