I don't know how healthy this is but: I haven't run into many people who are harder on my work than I am.
I have an attitude that there's absolutely nothing I do that can't be improved. This may sound miserable on the surface, but for me it's actually quite freeing. It has the effect of making it easier to accept that things aren't actually going to be perfect (so it can help avoid the trap of over-engineering) and at the same time, it makes it much easier to have productive conversations with co-workers about what to improve/delete/rework because the existing product is something that could be better.
The other thing to think about, IMO, is that that PR comment, snarky or not, was something someone put the time in to come up with. For you. It's a gift. I've worked in places where getting any kind of PR comment beyond "approved" or "Fix your indenting" was an uphill battle. So getting a comment from a colleague that is meant to a) help make you better at what you do and b) help you both create something you can be proud of, is massively positive. It took time and effort for them to read what you did and think of a way to make it better.
This made me realize I have two completely different emotional responses to criticism, even though both can be described as "upset": If I agree with the criticism, it makes me sad-upset because I let myself and others down; if I don't agree, it makes me angry-upset because someone else made a mistake (i.e. the criticism) and then tried to make that mistake my problem. (To be clear, it's the second part that triggers anger: If someone crashes their car on the side of the road, I've no reason to be angry; but if they crash their car into mine, then I do have a reason.)
I believe that both of these responses can be valuable when handled correctly, but doing so requires a different strategy for each. Actually, the first step is the same for both: make sure that you've had the correct response: if you're sad, double check the criticism really is accurate; if angry, double check the criticism really is wrong. I think perhaps a lot of trouble can be attributed not to having one of these upset responses, but to having the wrong one! A helpful side-effect of thinking about the other kind of response is that they both mediate the other: thinking about situations/new evidence in which one might respond the other way to the same criticism alleviates the original emotional response.
The next steps are more involved and specific to each response but this comment is already longer than I meant it to be :).
I like the way you break down the emotional loop with criticism. For me, the way you've put this maps nicely to mindfulness practice. It's important to respond, rather than react to criticism. Taking a moment to listen to what your emotions are trying to tell you, and checking that against the facts of the situation is core to mindfulness.
Massively behind this sentiment. To be frank, thinking you can ever make something that is impossible to criticise to ego run rampant. OPs question shouldn't be "How do I deal with criticism" but "How do I tame my ego", and that's a topic with teachings as old as civilization itself.
I have an attitude that there's absolutely nothing I do that can't be improved. This may sound miserable on the surface, but for me it's actually quite freeing. It has the effect of making it easier to accept that things aren't actually going to be perfect (so it can help avoid the trap of over-engineering) and at the same time, it makes it much easier to have productive conversations with co-workers about what to improve/delete/rework because the existing product is something that could be better.
The other thing to think about, IMO, is that that PR comment, snarky or not, was something someone put the time in to come up with. For you. It's a gift. I've worked in places where getting any kind of PR comment beyond "approved" or "Fix your indenting" was an uphill battle. So getting a comment from a colleague that is meant to a) help make you better at what you do and b) help you both create something you can be proud of, is massively positive. It took time and effort for them to read what you did and think of a way to make it better.