Osamenor, I get that you asked your question in a general way, but when we're hard on ourselves, it gets very, very personal. A couple of signatures that can do this:
1. Saturn, Pluto, or Neptune opposite or square one's ascendant, sun, or moon.
2. Saturn conjunct one's personal point/s.
3. natal Mars retrograde.
4. Chiron conjunct, opposite, or square one's sun.
I understand the meaning of "ego" but since it comes out of Freudian psychology, which has a whole lot wrong with it, I'm not so keen on using it unless someone generally gets into a competitive relationship with other people.
I'd rather think of the sun as one's identity or sense of self; and the ascendant has how we present ourselves to other people, whether consciously or unconsciously.
It is possible to stop self-critical thoughts, but it takes a conscious choice, effort, and practice. When you find your brain wandering down the path of self-criticism, just stop it and immediately switch to alternative thoughts-- like self-empowering affirmations-- at the ready. Your brain normally will follow accustomed synapses, but you can train it to pursue different pathways. This is hard to start with, but gets easier with practice.
Anything to stop the typical negative thought-flow is helpful. When you find the old self-critical thoughts emerging, say "Stop!!" Then do something else. Count to 10 backwards, hum a favourite tune, check a cell phone joke app. Whatever breaks up the mindset.
A sense of self-deprecating humour is a huge asset.
Sometimes a loathing thought can be turned into a little wry humour.
No signs are bigger stands for self improvement than Capricorn and Leo.
I believe in a choice-centered astrology. My horoscope looks like a train wreck, and I say it works.