If you're fairly sure that whatever you have to tell someone will hurt their feelings, I would strongly suggest you take some time to think seriously about whether it absolutely HAS to be said.
There are varying degrees of "hurt." If you find it necessary to make a statement that may hurt their ego, try to be clear but brief......and you might want to offer an apology for having to do it... If you are delivering sad or disappointing news, use kindness and be supportive. It's never a pleasant thing to have to tell someone anything that you feel with upset them. But if it's left up to you and must be done, just remember to be gentle.