This might sound callous, but it's disruptive to have someone crying in the office and sharing their personal drama's with everyone else or becoming a topic of conversation/pity/whatever.
So you boss is both entitled to and doing the right thing by sending you home. It's the normal thing to do. It would be abnormal for him to have expected you to continue working for the rest of the day. Both for decency reasons and business reasons.