‘That’s par for the course!’ you could say, except that I don’t play or understand golf, so I take it as a nonsensical ‘what were you expecting’. Rejections are not guaranteed, but not uncommon either. Their frequency makes good practice for adverbs: seldom, rarely, occasionally, eventually… At some point most of us will face one. Or more.
What you do after a rejection will depend on how attached you are to the manuscript. Some works are like progeny, not perfect, but you put effort and love on them and it hurts to see them rejected. Other manuscripts are more like a second or third-degree cousin: you see them at the odd family reunion and someone reminds you of their name. They are like ‘it’s a shame that cousin Bob was run over by a bus’ and we just talk about the weather or the chances of your favourite sports team winning the quarter finals this weekend.
What should you do after a rejection? Based on attachment: if a progeny manuscript, you can mourn, swear at the dumb referees, complain to your chosen divinity, etc. Use your indoor voice, though; you are a professional. If a cousin Bob manuscript, roll your eyes, mumble something about academia, and move on with your day. Whatever the paper, never, and I mean NEVER, reply to the editor during the 24-48 hours following the journal decision. You cannot uninsult/deinsult the editor. Bad idea. Wait a day or two until you are in a more ‘philosophical’ mood. Then look at the feedback.
You could be tempted to just resubmit the manuscript with no changes to a different journal. I have seen people do that; I mean, I have been the reviewer for the same identical manuscript. I dislike reviewing manuscripts, it’s a thankless task and I rather watch TV. Doing it twice? Nope. Instead, see if you can rescue anything from the feedback to improve the manuscript. Some times the reviewers were petty and inconsiderate, those as%^%$es. Some times they were really keen on helping you. Ignore the as%^%$es’ comments and use the helpful ones. Peer review is deeply broken, it’s a lottery, and there are no guarantees that you’ll get useful feedback.
At some point you’ll face the decision: do I save and resubmit this manuscript or I was wrong, it was a dud. I’ve had both, manuscripts that improved a lot (thanks anonymous referees!) and ones that were ‘put to sleep’ using an euphemism. I have another one that is ‘in my desk drawer’, waiting to be operated, polished and converted in something I really like and resubmit.
Journal articles were supposed to be about communicating results and sharing ideas. They are now a currency, a metric to be tracked and reported in Faculty meetings, but organisations rarely track the process of getting there. Instead of journal articles I wish we all wrote blog posts, telling each other cool results and neat ideas.