Telling my sons dad I'm pregnant

So I found out i'm pregnant a few days ago and I know it's dumb but i'm afraid to tell my son's father. We were together for several years and broke up almost 2 years ago. I met my husband shortly after we broke up. I didn't think I would fall for someone so soon but I did and now a year and a half later we are pregnant. I don't have feelings for my ex anymore but he's still my friend we always remained kind and civil to each other. I just can't see him taking this news well and it sucks because I know he will be upset (pretty sure he still has feelings for me). Anyone else ever have this problem?