How far back do you want to go OP?
Before the advent of SSRI's Benzodiazepines were commonplace, Valium, aka 'Mother's little helper', was often prescribed to 'hysterical' women seen as unable to cope with everyday life. Thorazine, aka the 'chemical cosh' has been around since the 1950's, although that is not typically prescribed as an anti-depressant, rather it's an anti-psychotic that is first prescribed to many people during a hospital stay and treatment continued after release. It's known as Chlorpromazine in the UK, it's still used, and it's utterly hellish to taper off so many people get parked on it for decades regardless of the consequences.
Prior to that, if you could actually afford to pay for respite as a voluntary patient in an asylum, typical treatments were much the same as they are today, so fresh air, exercise, nutrition, stimulation through recreational activities and so on, after the advent of psychoanalysis talking therapies became a normal part of treatment. If you were unfortunate enough to be sent to an asylum involuntarily, but you had a family who could pay for your treatment, you might be subjected to all sorts of bizarre nonsense including stuffing you in a 'bed' sized cage to restrict your movement for hours on end, being hung by your ankles, plunged into freezing cold water, every other type of outdated and discredited 'therapy' you care to name, and you'd be subject to the whims of the governor and staff who, dependant upon your demeanour or personality, may decide to act with sympathy towards you or may not. Declaring your treatment over and discharging you would usually have been entirely at the discretion of the governor, and there are umpteen documented cases of governor/inmate disputes that played out over decades. Challenging your own treatment was difficult but not impossible if you had the means, and there are instances of court hearings taking place where inmates successfully advocated for their own sanity and fitness for discharge. There are also cases of women challenging their institutionalisation where the plaintiff is quite clearly perfectly well and sane, but because she had been a recalcitrant wife in one respect or another, she'd been thrown into an asylum due to doctors working in cahoots with the husband for no other reason than the husband wishing to be freed of his legal obligations with regard to his wife.
If you were an unpaid inmate, you'd likely just be dumped into a communal gallery and left to get on with it, i.e. 'bedlam', and be entirely at the mercy of charity.
Practices like ECT are still used because they are often effective as a 'last resort' treatment for patients with certain eating disorders, and some patients with profound depressions that are drug-resistant. I know of a few people who swear by it as the only thing that actually works for them even though it's being used less and less and it's usually viewed as barbaric and outdated to the layman. I also know of at least one case of it being responsible for serious brain injury, so it isn't entirely without risk either.
Prior to the advent of the NHS there was no real 'care in the community' equivalent, so mental illness was dependent on charity in much the same way physical ill health was. Many parishes did operate benevolent funds, churches and charities sometimes operated homes and hostels for the sick and infirm, but those were understandably spotty and never really adequate for demand.