It's not a bad beat if he calls your raise with a perfectly playable hand
There is not enough info here to know if half your stack was a cheap call for him if he's big stack or if 99 is his big hopeful hand if he's short stack
This is why you should post hand histories instead of just remembering your perspective on it, but when two playable hands clash and the underdog wins, it is not a bad beat it is just how poker is.
If you haven't learned this yet then you are in for some agonising times in the future!