Do you have an internal pre-peer review system and need to keep a relationship with the reviewer, look them in the eye afterwards?
I suppose what you do is be determined to take the comments in a constructive spirit even if they are expressed in an unkind tone or seem utterly petty -- take all your emotions out of it. Be determined to see their comments as an opportunity.
If they were rude in what they say -- now you know they are rude. Good to have that intelligence. Ditto if they are petty or dogmatic. It's possible you'll decide most their comments are "fair enough:" so this is just part of your learning curve. We're all on a learning curve, every moment in life. Embrace it.
if they say something irrational, your response is "I must not have explained very well, how can I explain better?"
If they say something you bluntly don't agree with, then fine to respond with "They are wrong. How can I present this better so that someone else doesn't raise such an incorrect criticism?"
Little things like typos -- say "Thanks for reading carefully"
A comment like "set my teeth on edge" -- if there are specifics what they mean, then address each specific. If there is no further detail then your response is "I'll reread to make sure this is all in good plain English" and move on.
That said, I adored my colleague who wrote back in a cover letter once to a journal "THE REVIEWER IS WRONG" - (capitals mine). Colleague explained in 2 sentences why and that was that, quickly to publication went that article.