Ok, regarding automated trading, discretionary trading and their relationship to psychology, I've finally found a way to put it all together.
1) Automated consists of univocal rules and in this sense psychology does not matter.
2) Discretionary by definition must have at least a part of "discretionary" decisions, which means choices made by intuition, instinct, improvisation. The importance of psychology will be proportional to how "discretionary" a discretionary method is. But no matter how important psychology will be in achieving profitability, a knowledge of the market will always be needed and therefore an unprofitable trader cannot only look for the psychological causes of unprofitability. In other words trading isn't "all about psychology", as some say.
For example, in many cases, he will mistakenly think that not using a stoploss and incurring in a loss is a psychological problem, whereas he will forget that in other instances he made money because of not using that same stoploss, and that is why this time he was skeptical about using it. So it is only a psychological problem in the sense that he doesn't realize that a rule that can have exceptions is not a rule, that the stoploss is not a rule for his method (and maybe that he doesn't even have a method). The problem centers around this: how many "univocal" rules do we really have in our discretionary system? A rule that can be broken is not a rule, a rule that can have exceptions is not a rule, and therefore we can't blame lack of discipline for a loss due to breaking that (non) rule. And a method that doesn't have at least one non-breakable rule is not a method. Then, if we have no univocal rules, and therefore no method (except "instinct"), our type trading is the most dependent on psychology - but still it is not entirely about psychology, because even if we don't state via rules our knowledge on the markets, it will influence our instinct, and it will be needed to be profitable.
Unfortunately, in discretionary trading there is no way to measure exactly how much your unprofitability is due to psychology and how much it is due to your lack of knowledge of the markets.