Coping with partner's ex relation

How do you cope with your partner's ex relation? Moreover if he has a child ? Cant stop feeling bad whenever he goes out with child, feel even worse if i go along, i know im being unreasonable but his child really looks like her mum, cant stop thinking she reminds him of his ex...