I felt exactly the same way when I found out DD2 was a girl. I needed to find out at the scan coz I needed time to prepare myself for another girl.
I prayed right up til the minute she was born that she'd be a boy
I can't help you with your grieving. Just give you more & tell you its ok to be upset. & just understand.