Bruce seized onto the idea of Harvey Dent as saviour a little too easily and likely prompted by his pining for Rachel. Too bad he couldn't see that she was already out of reach. It was clear she really didn't know him. I also don't really agree with the ending thought that Batman had to be made into a hunted criminal just to cover up what Harvey had done. If a scapegoat were really need there were certainly other more "worthy" candidates available in a snake pit like Gotham City.
It's about more than that, though. The arc of the two films so far is the redemption of Gotham. In the first film, the city was so corrupt and lost that it needed Batman and his extreme methods to save it from itself. Batman gave Gotham a symbol of hope to start pulling them out of despair and back toward the light, but that was just the first step, an extreme measure for an extreme situation. The next step was healing Gotham to the point that the system could work again and the people would have enough hope and belief in their city that they could make it a safe, just place on their own, without needing the crutch of Batman anymore. Building up Harvey was about that, about giving Gotham a
legitimate champion who worked within the system and out in the open. Batman could only take the city's recovery so far, and he needed to hand it off to Harvey to take it the rest of the way. Batman's sacrifice at the end was about completing that transition: replacing Batman with Harvey as the city's symbol of hope and justice, weaning Gotham of its dependence on Batman and enabling it to stand on its own as a healthy society once more.