For my kid- commiserating seems to help. She’s a closed book so that helps her express her disappointment. Then we make a game plan on how to move forward. She’s very practical so having a plan helps.
She’s dealt with a few pretty tough and unexpected rejections. So we’ve, unfortunately, have had practice.