I have an occasional feature called, "The Quotable Sippo." It's very simple, I just let Catholic apologist Art Sippo speak for himself. Recently, Dr. Sippo provided some of his insights, and well... let's just let the good doctor speak for himself.
I think Luther rejected good works because he did not believe in them. He was so depressed and introspective that he had difficulty in finding anything good in his motivation. I think he suffered from the typical scrupulosity problem. Unless he could find himself to be acting out of purely unselfish and disinterested motives, he thought that he was commiting a sin. This excessive pessimism is behind the Protestant idea of "Total Depravity".
Justification by faith alone (JBFA) was used by Luther as what psychiatrists call a catharsis. it is a strategy by which he was able to combat his depression and it kept him from committing suicide. (Read his autobiographical material and you will find this is literally true.)
If we obsessed about our motivations and kept worrying about whether or not we were acting with sufficient beneficence it would distract us from actually DOING good. Staupitz, Luther's confessor, told him to stop obsessing and just immerse himself in the work of his order. The idea was to ake his mind off himself and turn it outward towards doing good. Luther was far too self absorbed to do this and he wore himself out trying to excel at everything. This is what led him to postulate JBFA.
Based on this analysis, it is my opinion that the basis of Protestant theology is mental illness. You can imagine that this does not go over well with our sepbreth.[source]