AOA! I had severe depression for more than 2 years that I could neither focux on my studies nor on my daily routine tasks. My family wasn't supportive and I had no friend to talk to, as my father doesn't let me leave home much.I was a mere dead soul. So one day I started talking to a very nice guy online and we got into a relationship.After that I became much better.I know it's haram to keep a relationship but I know if I were not talking to him I could never get out of my depression.
Alaikumassalam wa rahmatullah,
Sorry to read about your situation. Such relationships are not clearly defined as haram in Islam as I discuss here. But they are disliked even if they have a great psychological benefit because while they can rescue you from one difficulty they can cause you fall into an equal or greater one.
Whether you should continue in that relationship or end it depends on the strength of your faith. God does not ask you to bear more than you are able. But the admirable and pious thing is to accept your situation as it is rather than working secretly to bypass it. It is your family’s fault, judging from what you said, that you have such a strong need for that relationship, so they cannot justly blame you (although they will do so if they found out). Ideally you should get medical help for your depression and avoid secret romances until you are ready to marry.
For now, try to dedicate yourself to God and get close to Him through Quran-reading and tahajjud. Ask Him constantly to help you and change your situation for a better one.