I don't think that killing every second living being is ethically defendable, no matter what the benefits are to those that survive. It is like deciding who gets on the lifeboat. If there is no room for all, no decision that one can make is just - aside from leaving the decision to every individual about his or her fate, that is.
And to imagine a galaxy where every star and planet seems to be reachable for anyone isn't able to sustain the life in it is hard, to say the least. So within the setting of "The Avengers" I can't even take Thanos premise seriously.
And for Earth: the thing with life is that it wants to live. It will not care wether that intent is sustainable, it will try until it cannot any longer. Even just enforcing birth control world wide would not be acceptable.
Nature has its own way to deal with overpopulation. If resources get exhausted, populations will decrease - with a lot of suffering. That's what is inevitable. Thanos isn't.