Lots of people seem to think that the ending needed to have been happier. This isn't true as the whole story is about how Dr. Horrible became a Super Villian. If he and Penny would have ended up together, of course she would have softened him and the film would have been badly named.
Rather, I think that it should have in some way been shown that Captain Hammer was the cause of Penny's death in Dr. Horrible's mind. This would have proved to him that he was in the right. It's possible this was the intention in the script anyway, but if so it got lost. Dr. Horrible's song should have been more explicit about it. “Captain Hammer and the world will rue the day they killed my Penny.” Also, it might have made him more demented if Penny really did love Hammer as opposed to slinking away from him, which I would have prefered to the more tragic ending of her and Dr. Horrible almost getting together had not fate intervened.
Secondly, there's the problem of Penny. You can't kill the most loveable character in a cast without a good reason. And in this case, that reason didn't exist. It was just sort of confusing rather than pathetic. I would have had Dr. Horrible quickly fix his freeze ray and freeze Penny to keep her alive almost at the brink of death. Then, he could continue having her as his motivation for gaining fame and money through his dastardly deeds as he search for a way to save her. This would have brought things together better too. For one thing, the freeze ray which was assembled throughout the picture would have meant more. Furthermore, if Penny still loved Captian Hammer, while Dr. Horrible believed she loved him, or at least would love him, the whole situation would have been delightfully ironic. Not to mention enigmatic, afterall, what will happen if she does wake up?
As it is with Dr. Horrible believing Penny loved Captain Hammer as she died, when really she didn't, everything is just sort of blah, not to mention unbelievable. After all, would this situation lead truely lead to greatness in their line of work, even if it's villany? The energy required for that has to be rewarded or fueled in some way. In real life this would just lead to a murky depression, both for the characters and the viewers.