I find it useful to think of the world as a neighborhood. A couple streets, a bunch of house, kids playing out front, etc.
Do you have to take care of yourself and your family first? Sure, but this isn't an all or nothing scenario. You should always be mindful of others around you and help out with what you can.
That isn't just an altruistic attitude. Even if all you really care about is yourself, what happens to yourself when your neighborhood degrades? People move, property devalues, a couple houses burn down, crime moves in, etc.
We don't live on a remote island. We are interconnected. Taking care of others is in part also taking care of ourselves.
That doesn't mean that we have the proper balance, but it is a mistake to suggest that we should just ignore our neighbor's house burning down.
In my opinion I think you should look after the needy of your own country first. I live in the UK and we have suffered/are suffering from awful flooding, poverty, homeless etc etc yet we are always helping other countries first, which is a good thing but charity definately needs to start at home.