It would have been better if he'd requested that you to stay after class and then asked you that question. In the circumstances (and I am a college professor), I wouldn't have had a problem if you'd replied, "Well, my brother died, so I've had a lot on my mind."
Some teachers do feel that "tough love" is the better way to go -- that's always been the case -- and you do need to figure out how to deal with it, because people like that will always be in your life. The corners of the world will not be padded for you.
However, why didn't your teachers know about your brother? Normally, this information would have been disseminated. That makes me very suspicious of your story.
Don't use family members' deaths -- or supposed deaths -- to troll.