The reaction you had probably does have a lot to do with how closely it occurred to your own situation, which makes sense. Had it happened at another time, you might not have reacted as strongly.
However, don't make yourself sick over someone else's situation. Keep your issues separate. Find something happy...rent some funny movies...shrug off the worries. Do whatever it takes to get out of this mentality you're in. And keep in mind, there's really nothing you can do about what's going on with your friend, except be there for him. And heck, who knows? The two of them may patch things up. You never know what the future holds.
Well, anyway, I don't have a lot of words of wisdom to give you, but I just wanted to wish you some peace and hopes that tomorrow will be a better day.
Hang in there. You'll be okay. It'll pass.