You use your best judgement to see what kinds of actions seem to be the direct and immediate causes of bad things to happen to you and you try to work on those areas.
This is I admit a kind of בדיעבד ad hoc [after the fact] kind of scheme. It is not a Pro-Active Approach. But it seems the best thing to do in the absence of any other kind of reliable guide.
Reb Nachman seems to have taken this approach in his being against doctors. It is clear that he was reacting to the dismal state of medicine in his days [though it is arguable if there really has been much progress since then.] Reacting to a bad situation and making some kind of corrective measure is clearly the idea behind measures taken by the sages to make laws to safeguard the Torah.
The Rambam in the Guide says many of the Laws of the Torah are in fact Divine safeguards against flaws in human nature.