I've a long standing friend (DF) of 20+ years, who 15 years ago married into my family. DF has always been somewhat competitive, often comparing how well they are doing to various extended family members and worried about being seen as a 'poor relation'. They also have always had a bit of a chip on their shoulder about having achieved a lower level of education than most of the rest of the family. I don't care about any of this stuff. We all have nice partners, good jobs and enough money, that's all that matters and comparison is pointless, it really doesn't matter.
DF has over the past few years been very supportive through a terrible period of ill health, which has affected our finances, jobs, relationship and quite frankly scared the shit out of DH and I. Luckily we have now come through this but it has been a horrendous time, really long hard slog where it's not overstating it to say we thought that one of us might die.
Despite this, we have a lovely life. We love each other a lot and have come out the other side strong. Finances have taken a bashing but we're ok, can still pay the mortgage, have both held onto our jobs and can now start building up more of a buffer again. In short, we've had a shit few years but we're happy. Additionally this year, we've both been lucky enough to be promoted and get bonuses/payrises. Finally, I'm pregnant, which obviously we've been putting off for a while due to the health issues.
For the last month (since we've had the final all clear health wise, one of the promotions and announced the pregnancy) DF has been really rude. Overtly rude about DH and made several digs at me which have hurt. Some around the theme of being arrogant and some about DHs appearance. I find this really hard to take. We are not arrogant, we are just happy with what we've got. We have worked hard and overcome some significant obstacles and I know lots of that is to do with luck as well. We don't take what we've got for granted, we continue to work hard and are thankful every day for each other, our jobs, our house and our friends and family.
DF has also made several comments regarding how pissed they'll be if I turn out to be pregnant with a boy, as I'll be stealing their glory as 'the only girl mum' 
Looking back over the years of our friendship this is a pattern. DF is a brilliant friend when things are going badly for us (we've had significant issues caused by DHs family) but when things start to go well it's all snidey comments and really personal digs. I'm just a bit tired of it if I'm honest and a bit disappointed. I wouldn't wish bad times on anyone and am so happy for my family's and friend's happiness and success and just wish she could be the same way. I really want to start seeing less of DF but feel this makes me ungrateful for the support she's given during the hard times.
Has anyone had a friend or family member like this? How did you deal with them?