You don't. He did his friend a favor which doesn't involve you and is none of your business. You are putting in alot of your interpretation of things based off your hurt feelings and in the past you wouldn't have given it a second thought (However, he does to everyone else so that they can stroke his ego.).
No one said that you had to stroke is ego. Being nice to your H and dropping a compliment every now and then are just things that you should have been doing in the past same as he.
You have to learn to separate those two.
It doesn't cost anything, but for someone that's been too deep into themself for too long it may feel like ripping off a pound of flesh for them to issue these complements.