There exists a great tradition of rogue heroes: Moliere's heroes are almost all of this stripe, powerful main characters who behave in morally ambiguous or immoral ways. The classical view was to indulge such characters only if they paid the price for their immorality by the end of the story. Thus we have Don Juan carried off to Hell, Falstaff abandoned by Prince Hal (King Henry V), etc. The 20th Century will be remembered as the formative years of an entirely new artform: The cinema. Cinema did not have the equal rights with print media, and it was explicitly contrary to the Hayes office that evil or immoral characters be allowed to avoid punishment for their behavior.
These days, the rogue has become a favorite for writers wishing to explore morality in the modern world. This has given birth to some remarkable characters: James Ellroy's Bud White (if not all Ellroy's policeman characters), The Shield's Vic Mackey, and The Sopranos' Tony Soprano to name a few of the more obvious examples. These characters are complex mixtures of light and dark. But the serial form of storytelling, which has become every bit the vigorous, trenchant equal of cinematic storytelling, does not provide easy answers due to its very structure. A character such as Vic Mackey and Tony Soprano must perservere. We see more intimately into their lives. They are not simple symbols, but metaphors for society at large.
In the first season of The Sopranos, Tony Soprano begins seeing a psychiatrist due to debilitating anxiety attacks that leave him collapsed and on the verge of unconsciousness. As he begins to explore his feelings, his agitation increases, rather than decreases, but he stops collapsing. By the 12th episode he experiences anhedonia and hallucinatory fantasy (he interacts with someone who doesn't exist and has no awareness that he is experiencing a hallucination). It isn't until an attempt is made on his life that he breaks free of this downward spiral and resurfaces as a strong, self-assured, mafioso.
Clearly, Tony Soprano was suffering from an existential vacuum; the loss of personal meaning. Tony was unconscious of his own value as a man and a capo, until someone saw in him enough of a threat to attempt to whack him. At that point Tony's inner demon is vanquished. This is piquant irony. It is also an extremely powerful character arc. Who cannot identify with what Tony is going through? We must all tame our feelings of self-doubt, insecurity, and anxiety. Sometimes we have to have an external change before the internal change can occur. For Tony, that was surviving an assassination attempt. Few of us need to endure such a dramatic event, but the idea of cheating death often lead to a strong sense of existential certainty. Maybe this is why we ride roller-coasters, after all.
I have also found that making a big life change can also stir up the emotions and get one back on track. Moving is a good example. A new job, relationship, etc. can kick-start the psyche. Something that leads us to the new awareness that life is an unfolding series of revelations. As long as we're open and receptive to our own lives as they are, we will stay relatively sane and healthy. It isn't until we try to "cope" that our troubles ensue.