I'd say Batman lost some but he also won and I'd say it was overall a victory albeit at a cost. Rachel dying and Dent turning were obviously big losses, but both Batman and the people on the boats proved Joker's nihilistic philosophy was bogus nonsense. In addition, even though Bruce took responsibility for Dent's murders and embraced being a 'villain', I view it as an overall victory for him as he stopped Joker's twisting of Dent from shattering Gotham's spirit and he proved that he was willing to accept this burden being a 'Dark Knight'
Still my favorite superhero movie ending. I like Dark Knight Rises a lot but it never really lived up to TDK's amazing ending.