My mom is 50 years old and she was telling me her last period was 20 days long and she has depression is she going through menapause?

Peri-Menopause. At her age, it is likely she might be going through peri-menopause, a period, average 4 years, before menopause. Typical and common symptoms include irregular cycles, less time between cycles or skipped cycles, depression, hot flashes, trouble with sleep, mood swings/irritability. Hormonal imbalances/thyroid problems also need to be ruled out. She should see her doctor for an evaluation.
Perimenopause. Perimenopause is the time before menopause (and menopause is 1 year w/o a period). Women can have hot flashes, poor sleep, depression, mood swings, irregular periods with heavy bleeding, dizziness, memory fog, vaginal dryness. She should see her gyne to make sure there are no other causes of bleeding. Treatments will depend on the cause or possible hormones.
Probably. You mother's symptoms could easily be, and at her age likely are due to menopause. Most women with those symptoms would benefit from treatment for cycle control to lessen the bleeding and for treatment of the mood disorder. She should see her gynecologist.