I wouldn’t take Obito’s words too seriously. He was a teenage boy who was isolated and groomed by Madara. He’s like Anakin where he had a very naive and childlike worldview that became corrupted and twisted. This combined with his obsession with Rin who later died was a recipe for disaster.
Do not forget that he is an Uchiha. And the love of the Uchiha`s is much stronger than that of ordinary people. And when they lose it, they are consumed by hatred. Therefore, Obito was just unlucky that at the right time he did not have someone like Naruto by his side who could support him. And there was just the same person next to him, filled with despair (Madara). Therefore, everything that he saw in front of him next, he saw through the prism of despair, emphasizing the bad and considering all the good insignificant. Madara only gave him the power to change the world that Obito considered hell. And Obito's behavior is actually quite realistic. Falling into a pit of despair and pain is much easier than climbing out of it. And when everything around you convinces you that you're right, all people like Naruto will seem stupid to you. Both Obito and Naruto are right in their own way, the only difference is that they look at the world from different angles. Obito focuses on all the bad things that people do, so it seems to him that the world is not worth living in, because it is not perfect at all. He's kind of a Nihilist. And if you think about it, why live in a world where wars are taking place, people are dying, people are lying to each other, causing a lot of pain, etc. Naruto also focuses on all the good things that happen in life. They're both right.
Don't forget he was an orphan... He was not valued by most of the village... The only one who gave her familial love is rin... Sure he had kakashi and minato but they were his sensei and comrade.... While rin was more than that.... So his emptiness is actually very real... Madara played his part too bit i guess rin dying infront of him broke the last straw...