Oh, gosh. My daughter used to tantrum if she was not the first one up the stairs, the first one to brush her teeth, the first one to <fill in the blank.>
If I am to be completely honest, I think what helped most is time and an increase in maturity. She still has this trait at 8, but it is greatly diminished.
A huge breakthrough for her was when she came to realize that sometimes being "first" really didn't mean anything at all. For "first" in line, one day she realized that there was no particular advantage to being in the school building first after recess, and that technically speaking, the last person in line got a slightly longer recess
She had a similar issue with winning that did not improve until she had a firmer grasp on math. To her, she was fine with "I win one, they win one...I win one, they win one." To her that seemed "fair" and so she was completely at ease as long as she won half of the time, or maybe at least 1/3 of the time. When she was able to understand that "they" is not 1-one, but many ones, and in her class 22 other ones, she started to comprehend that in order to be "fair" she should only win once every 23 times, and that if she won more than that, then it wasn't "fair" to someone else because she took someone else's turn at winning. On an emotional level, this still doesn't quite jive with her, but on a purely rational level, it helps her get through losing a little better. At least she no longer outwardly tantrums, she just inwardly rants a bit in her head.
_________________
Mom to 2 exceptional atypical kids
Long BAP lineage