Thanos will never - in a million years - be classed as a hero. There may be an argument to suggest that his agenda to "rebalance" the universe had some merit because of the finite resources available and the inevitability of a breaking point, but he is still a villain of the oldest order. He's Machiavellian, sadistic and fundamentally evil, even if his conviction and his end goal are somewhat admirable.
But there's something about his plan to wipe out half of existence that makes it a little easier to think of him in softer terms. Or to at least change the perception of what he does a little.
We've already spoken about how Thanos and Tony Stark are mirror images, with the parallel most precisely felt in their concerns over ominous futures that end in apocalypse one way or another, and it seems Thanos was even more like Stark than we first thought. Stark is, after all, completely willing to do whatever it takes to win in the end: he will give up the Avengers' ability to operate autonomously, he will imprison members "for their own goal" and he will accidentally create a megalomaniac robot supervillain while attempting to create a defence system for Earth...
But most importantly of all, Tony Stark has made it VERY clear that he is willing to die for the Greater Good. He's come close to laying down his life more than once and Infinity War saw him willingly booking a one-way trip to space to deal with Thanos (seemingly alone, until Peter Parker revealed himself as a stowaway) and there's always been some nobility about his willingness to sacrifice himself as much as it looks like his only way "out" of his Iron Man addiction.
So what if Thanos is just the same in that respect too? What if Thanos had no plan beyond his click, because he couldn't have one? What if his willingness to do the ultimate extreme to save the universe from itself also came with the assumption that he wasn't going to make it out?
Fundamentally, Thanos had absolutely no way of knowing that his click wouldn't kill him too. Not only did he have to reconcile himself with the fact that he would have the blood of billions on his hands, he also had to accept something that no supervillain in the history of movies like this have ever had to. He had to accept the almost certainty of his own death and the fact that he might not be able to stand on the ashes triumphantly.
And that really should change how you should see him. He couldn't have planned for personal triumph - his hopes to save the universe were so pure that they would have had to fully accept that he wouldn't be there to watch it being saved. Which is pretty much exactly what defines Tony Stark too.