The human ego is such a funny thing. I don't know how we manage to have any relationships at all given some of our tendencies. Have you ever been in a bragging match about who has it worst? Here's a video of a comedy routine about what I mean.
Sorry to be cliché but, it's funny because it's true. I know people who have gotten really angry in conversations like this because what makes them feel special in this life is the suffering they have endured and if someone else has suffered more, or, if they are just claiming that they have, it undermines that thing that they believe makes them special or heroic. I've known people who you just can't vent to, or open up to about some tragedy or other because rather than show sympathy, they just have to prove that they've had it worse. Maybe all you've wanted from a conversation is a bit of sympathy and instead you got proof that if your friend got through something so much worse, you'll get through this, which, may help, but may also make you angry or hurt because your feelings have been so casually brushed aside as less important than their own.
I think that's the crux of it. Our ego wants to be important, maybe even the most important. Early on in high school I used to identify myself as someone with an inferiority complex. Towards the end of high school I realized that all I was really saying was "look at me!" which, was every bit as egotistical as endlessly touting some accomplishment.
It may be true that bragging about one's accomplishments or good fortune and stepping on someone's feelings surrounding a rough patch because you had it worse are equally obnoxious, but, the later is easier. To brag about your accomplishments you probably actually have to have some.
People who try to build themselves rather than leave their lives up to circumstances will set small goals for themselves that they can easily accomplish as they work their way towards bigger things. This is a good technique and I find that it works, but, some of those steps seem so small in comparison to what people tend to brag about, that, bragging about them might lead to being emotionally undermined if people look at you as if what you are so proud of is of no importance. It's much easier to show how circumstances have been against you. However, everyone can play that game and there is always someone who has had it worse.
Now, we all want to be loved and we all want to share our victories and our defeats with our loved ones. Hopefully we have had, have, or will have loved ones that we can share the victories and defeats with but given the tendencies of the human ego. I think my best strategy is to try and not take myself too seriously. That way I don't have to worry about winning or losing these sorts of pissing matches.