It is sad that one should wish for an alternative outcome to O. Henry's inspirational tale, since the ending is just perfect. Think about it: Old Berman had sacrificed his health and thus his life to save Joanna (Johnsy), who had lost hope and had given up on life, fashioning her desire to live on the survival of the last leaf on an ivy vine. Old Behrman had given Johnsy new hope and had changed her perception by painting a leaf, as Sue put it, his "masterpiece" - called thus because it saved Johnsy's life.
What if Old Behrman did not care and had not gone out into the cold and wet storm to paint the leaf? Johnsy had made up her mind that she was going to die and it would happen once the last leaf had fallen from the vine - this was her conviction. Old Behrman had realised the importance of inspiration, he needed to show that the leaf clung to life, in even the harshest circumstances, and that would have inspired Johnsy to do the same, which is exactly what happened.
The doctor realised that Johnsy needed something to motivate her to not give up and want to live. Without the leaf there, Johnsy would have lost the will to continue living. The survival of the leaf became a symbol for her own destiny. It is therefore more than likely that Johnsy would have died once she had seen the leaf gone for, as she says,
When the last one falls I must go, too.
Fortunately, the outcome is positive, for when Johnsy sees what she believes to be a real leaf still clinging to the vine even after a harsh storm, she declares:
Something has made that last leaf stay there to show me how wicked I was. It is a sin to want to die.