One of the poses where the ego becomes the most apparent is just a simple seated forward bend, paschimottana. We strain forward and hunch our back and shoulders trying to get to our toes. We're so focused on the need to reach father we can miss the stretch! Whether we're missing a stretch, or pulling a muscle trying to outdo the person next to us (or even just ourselves) letting our ego take over on the mat does us no favors.
One way to leave ego at the door is just recognizing your intention in practicing yoga. If you are clear with yourself that relaxation and taking care of yourself are just as important as becoming more flexible or stronger, then it's easier to take poses just as far as you individually need to.