Is it mandatory, religiously or ethically, to open up about major depression to your future spouse and their family before marriage? If one chooses not to tell them about depression before or during married life, will that be counted as a lie or deceit?
I am sorry to hear about your difficulties (or the difficulties of the person you are asking on behalf of).
To add to the below response, I find that marriages tend to work out best when the husband and wife feel they can talk openly to each other about their lives without feeling they have to keep secrets. It can be difficult to build a deep relationship when there are big parts of one's life one feels that one can't discuss.
At the same time, real life being what it is, sometimes it doesn't work out to share some things and sometimes one person will use them against the other if they are not entirely of good character. I can also understand not wanting to open up about something personal or sensitive to the whole family and having them weigh in on it or talk about it with each other.
Anyway, there is no shame (or at least there should be no shame) in mental health conditions, just as, indeed, there is often no shame in the other things that people, often women, feel compelled to keep secret for social reasons.
I do agree however that when a person finds out something later, oftentimes the reaction is worse because they feel deceived and that it is a betrayal of trust.
But you have to make whatever decision is best - perhaps consider doing istikhara about sharing it, if you are genuinely unsure?