This isn't a binary choice.
You don't need to view this as a "take it or leave it" decision - this is something you can talk to your editor about. And you don't need to choose between your ending and your editor's proposed ending - you can write a third ending, a fourth, a fifth, a sixteenth if need be.
Odds are, both you and your editor have valid concerns about each other's preferred endings. They'll be a lot more complicated than "upbeat vs. depressing," involving lots of factors and considerations, and once you understand why the editor isn't satisfied with your ending - odds are that you can come up with a new one that will satisfy both of you.
Of course, there are cases where an editor's view of a story differs vastly from the author's; sometimes you might disagree with an editor's concerns entirely, and then you'll need to decide whether publishing the work is worth the harm you feel is done to the story. (In this case, I think the two guiding principles are: how likely am I to be able to sell this to somebody else? And how do I feel about having my name signed to the revised story?.)
But the situation you're at right now is one where you disagree with the editor's proposal - not necessarily with his criticism. That's really not a problem, if you can incorporate those concerns and that criticism into something of your own, something that works with your story.