I've got a few.
One of them has already been mentioned: Sam Vimes from Discworld. He's a massive cynic, he's suspicious as hell and doesn't trust people as a whole, and he's sour and brooding as all hell. Despite this, he's actually an idealist who truly believes in the idea of justice in a city where thieves and assassins have been made into totally legal occupations. He's a good guy, in that he always strives to do the right thing, but he's not a nice guy, in that he'll play dirty if that's what it takes for the good guys to triumph. He's got all sorts of awful crap to deal with, and his life would be so much easier if he just gave in to corrupting influences, but he refuses to do so purely because of stubborn principles. I consider him a good fictional role model because he stands by his principles no matter what, and doesn't let even his own natural negativity change that.
Another is Roy Mustang from Fullmetal Alchemist (the Brotherhood/manga version more so than the 2003 anime version). He did a lot of horrible shit during a recent war (on orders, the whole war was really fucked up) and was made into a big ole war hero, but feels like some kind of monster for what he did, so he throws himself at bigger monsters and fights them in order to feel human again. He's also an idealist, his goal being to ensure that no more atrocities happen, preferably by becoming the leader of the country and being personally responsible for making sure it doesn't happen, though he's willing to sacrifice his life for his ideals if that's how it has to be. Oh, and when he needs to fight, he doesn't play around or try to be noble: if something needs to die, he makes it dead. I admire his pragmatism and willingness to atone for his sins.
And then there's the character I've used as an avatar for.. shit, going on two years now, across multiple forums and on various other platforms. Petyr Baelish, AKA Littlefinger, from A Song of Ice and Fire (and the Game of Thrones show). Now, he's a scummy motherfucker in a lot of ways, but that's not why I consider him a solid fictional role model. He began life as basically just one step above being a peasant, but through masterful planning and wit he turned into one of the most powerful people in the land (that's not a spoiler either, he starts off the books in that position). Though he has some less than noble goals and uses extremely nefarious methods, I respect him for proactively using what little he had to work for his goals rather than just crying about his situation and being willing to do whatever it takes to reach those goals.