for seventeen years she was incarcerated in various mental institutions , given massive doses of drugs and ruthless courses of electric shock treatment , with only brief respites when she returned home , a ghost of the girl she had once been .