As for the ego question, of course Pride (in the sense of Conceit) arising from respect, and Self-Beating arising from Loss of Respect, are not the most healthy qualities of mind, according to Buddhism. Technically, both come from an idea of Self being valued high or low in the others' eyes, therefore from the ego. Not surprisingly then, learning to let go of the deeply ingrained attachment to saving one's "face" and the panical fear of being disgraced has traditionally been a big part of Mahayana's teacher/student relationship. At the same time, on the lower levels of virtue, Pride and Self-Beating could be useful motivators stirring the sentient being towards a better path, so in this sense they can be useful to a certain degree. Check out "hiri and ottappa" for the traditional take on this.