There are psychological studies (can't link, they're in professional journals) which show that we are far more jealous when someone close to us has some good fortune than when it's someone we don't know.
This happens regardless of the extent of the good luck itself - eg the jealousy hits us far harder if a friend wins £10k than it does when some random wins £100 million on the lottery. It is also not directly linked to our own situation, so in that example if you were hard up you would feel the jealousy very much, but you would still feel some jealousy even if you were comfortably off.
(Disclaimer - I know that this is inviting responses form some posters of 'I wouldn't be jealous, I would be thrilled if my DP, BFF, DSis whoever had some good luck'. It's not everyone, but it is proven to be a general pattern of reaction.)
And when it's someone close there are constant reminders, whereas with the random you forget very quickly.
You are really struggling personally, you haven't had anything nice for yourself for a long time, and your DH gets a gift where at an objective level the worth of the gift is out of proportion to the effort put in.
You are going to struggle with this, because that's just the way we respond.
Time will help to fade the feelings, but I also suggest that you might ask DH if there is some spare money that would allow you to have a bit of a shopping spree, maybe a haircut and a warm coat for the winter.
And try not to beat yourself up for feeling this way, because then you'll make yourself feel even worse.