Are there a stable expression for a situation when Person A blames B and tells how B is bad in order to make himself (A) feel good?
I would say something like "feed ego at cost of others", but I google it and it looks like "feed ego" has rather positive meaning in English and means "making feel good by doing good work or receiving a compliment".
Best Answer
I don't know of a word or phrase that captures everything you are describing. I think to make himself feel good sounds fine. So I recommend a few ways to change the first part of your sentence. I provide this simplified model:
Aside from the other good answers, I think bully (mentioned in the comments) and ridicule are also possible.
The context should imply that B would feel bad.
Crudely, you can say crap on (mildly offensive) or shit on (offensive):
Lastly, you don't need it, but I think it's idiomatic to include just in the sentence. It stresses the idea that Person A only does that to make himself feel good. It makes A look really bad.