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:
Person A ____ Person B to make himself feel good.
Aside from the other good answers, I think bully (mentioned in the comments) and ridicule are also possible.
- bully
transitive verb
1 : to treat (someone) in a cruel, insulting, threatening, or aggressive fashion : to act like a bully toward • bullied her younger brother)
(M-W)
- ridicule
: to laugh at and make jokes about (someone or something) in a cruel or harsh way : to make fun of (someone or something)
(M-W)
The context should imply that B would feel bad.
Crudely, you can say crap on (mildly offensive) or shit on (offensive):
shit on somebody
— phrasal verb with shit uk /ʃɪt/ us /ʃɪt/ verb present participle shitting, past tense and past participle shit, shat or shitted offensive
to treat someone very badly and unkindly:
He made his money by shitting on other people.
(Cambridge Dictionary)
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.
Person A ____ Person B just to make himself feel good.