Having a broken heart and being depressed are two quite different things.
Depression comes from the “Other Side” and is hated by G-d. But a broken heart is very dear and precious to Go-d, as in “The sacrifices of G-d are a broken spirit; a broken and a contrite heart, O G-d, You will not despise” (T’hillim 51:19).
It would be very good to be brokenhearted all day. But this could easily throw most people into gloom and depression. You should therefore set aside some time each day for heartbreak. Seclude yourself with Hashem for a given time and break your heart with regret over your sins. Then be joyful for the rest of the day. (Likutei Moharan II: 24)
Rebbe Nachman, Sichot HaRan #41