Just because Middle-earth is a fantasy land coming entirely out of Tolkien's own brain does not mean that it has no rules. Tolkien gives all of his characters limits to their abilities to keep them from getting too superhuman. So Gandalf can't just walk in and save everybody; he has to make choices between battling the Lord of the Nazgûl and saving Faramir. And Frodo can't just walk away from the traumas of the Ring quest without problems; he eventually realizes that he has suffered too much to stay in Middle-earth. One of the things that makes The Return of the King so oddly realistic, in spite of its elves and magic, is that Tolkien insists on the importance of sacrifice in his adventures. Just like in real life, you can't get something for nothing in Middle-earth.
In order for a sacrifice to be a good one in Middle-earth, it has to be selfless. Sure, Denethor was willing to give up his life, but it was for all the wrong (selfish) reasons, and that's why his suicide is just plain bad news.
Sometimes, you just have to pass the torch. The elves' departure from Middle-earth is not only a sacrifice of their homes in Rivendell and Lothlórien, but also of their status at the top of the hierarchy of peoples in Middle-earth.