Freud was trained as a neurologist. Medicine at that time was very mechanistic in its outlook, and had little--if anything--in its repertoire to effectively treat mental disorders. In the mid 1800s there was extensive interest in hysterical neurosis (hysteria), an apparently neurological disorder that had no physiological explanation and thus fell outside of the mechanistic perspective. Symptoms of hysteria include paralysis, convulsions, losses of sensation, speech abnormalities, or blindness.
In 1885 Freud had the opportunity to study in Paris with J. M. Charcot, a world-famous neurologist who was having success treating hysteria with a new technique called hypnosis. While Charcot believed that hypnosis had a physical basis, Freud believed its effects were psychological.
Freud returned to Vienna and began to work with Joseph Breur, a physician who had made important discoveries while working with patients with hysteria. There was a great deal of interest at the time in the unconscious, the most important contribution was Eduard von Harmann's book The Philosophy of the Unconscious (1869) which quickly went through 9 printings.
Freud took his experiences with Charcot and Bruer, and the contemporary ideas concerning the unconscious, and created not only the first comprehensive model of mental illness, but also a psychotherapeutic approach for treating it (called 'psychoanalysis'). His was the predominant model used by the medical profession to treat mental disorders until the development of electroconvulsive therapy and drug treatments opened the door for the medical profession to return to a more mechanistic approach.
While Freud's model, which he continually improved and updated, provided a mentalistic intervention it was still heavily rooted in the mechanistic view of the world, including Newtonian physics. His model contains metaphors of hydraulic pressure, mental forces in dynamic equilibrium, and constant reference to such physical constructs as energy, force, and drive.
Psychotherapy after Freud took off in many directions. Some approaches were modifications of his psychoanalysis, other diverged more radically. One indication of Freud's effect on psychotherapy can be seen by examining the biographies of the great psychotherapists who were to subsequently create their own approaches. Almost all of them were originally trained as psychoanalysts.