first of all, i'm so so sorry for how your family treated you- nobody deserves that, and i'm glad that you've moved out and are out of that situation.
mental illness is quite a broad term, and it can cover all kinds of things- as well, it's important to consider that mental illness and having poor mental health aren't necessarily the same thing. from what you've said, it could be either, but more likely poor mental health- however, i would recommend talking to your doctor or a therapist about your thoughts and how you've been feeling, as well as maybe contacting some support groups for people with family issues, trauma, etc. so you can get a better understanding of what you're going through and what might help you. as a start, it might be worth looking at symptoms of trauma and seeing what resonates with you, what sounds familiar, etc. as that sounds like what it might be (however i am not a professional, so take this with a pinch of salt).
it's hard to say just from one post what you might be going through, but i hope that you know you're not alone, and you don't have to just suffer through it. there is help out there and there are ways for you to understand and learn to recover from these thoughts and what your family said to you. i wish you the best, and i hope things get easier for you soon <3