If you catch yourself saying something negative about someone else it is an indication that something needs to be looked at in your own life, something needs some divine attention. It also shows that you aren't content in some way.
We shouldn't ever say negative stuff about others but we're human and we probably will at times. If we can catch ourselves doing this then God can use it for good. We can stop and ask God to examine our hearts so what needs to be restored will be.
It gets back to a couple of things Jesus says (He is amazing).
In Matthew 7:1-3 Jesus says, "Do not judge lest you be judged. For in the way you judge, you will be judged; and by your standard of measure, it will be measured to you. And why do you look at the speck that is in your brother's eye, but do not notice the log that is in your own eye?"
Okay, now take that verse and put it alongside Matthew 22:39 where Jesus says, "You shall love your neighbor as yourself."
If we are speaking negatively about someone else we may be loving our neighbor as ourselves because possibly what we speak against in them is what we know needs to be changed in us. Now, think on this -- how you love yourself is the limit to how you can love others. If you detest yourself there is no way you will get past yourself to love others freely. You have to freely accept yourself in the light of Jesus Christ (for God loves you) and realize you are a work in progress. When you can do this genuinely in yourself you will be able to do this with others.
There is no condemnation in Jesus Christ (Romans 8:1). If we catch ourselves speaking negatively about someone our first reaction might be to condemn ourselves. Don't do that. Just stop. Realize what you are doing and stop. Say a prayer for that person. Our words are powerful. Every word is a word of life or death. We choose what kind of words we will speak.
"With (our tongue) we bless our Lord and Father; and with it we curse men, who have been made in the likeness of God; form the same mouth come both blessing and cursing. My brethren, these things ought not to be this way. Does a fountain send out from the same opening both fresh and bitter water?" James 3:9-11
We all are works in progress. Don't waste time in condemnation. Just turn back to God and His ways.