First, seek out a kink-aware health professional. They can advise you about your medical and mental health issues without telling you that BDSM is the cause of your problems. Try this site:
https://www.ncsfreedom.org/resources/kink-aware-professionals-directory/kap-directory-homepage.html
Second, let's clarify something. Enjoying watching violence is not the same thing as being into BDSM, and from what you've said, I'm not clear where you fit on that issue. BDSM is defined as consensual power exchange. In the real of pain play, that means that a dom enjoys inflicting pain on a willing submissive. Doms and subs may be aroused by the fantasy of non-consensuality, but BDSM play requires actual consent. If there is no consent on the sub's part, the action is rape, assault and a variety of other immoral things, depending on what's actually done. I'm a sadist; I like to inflict pain and watch a boy struggle to handle it. And I love the fantasy of raping someone or torturing them to 'teach them a lesson'. But I would NEVER do that in reality. The moment the boy makes it clear that he's not enjoying himself, I stop, and I would be deeply upset if a boy told me that he had not consented to something I did. I can enjoy some cinematic violence (like the chair torture scene in Casino Royale), but in general, I don't find the spectacle of people's terror enjoyable, so I find films like Saw and Hostel to be disgusting and immoral.
So, if you're saying that you enjoy the fantasy of non-consent and consensual pain play, then you're not mentally ill. On the other hand, if you find the idea of actually hurting someone who doesn't consent, if you find things like Saw sexually arousing, then you may very well have a problem that needs treatment. If you're in some grey area, where you're not sure if you would require consent, you shouldn't do BDSM. It requires a pretty solid foundation in ethics and consent.
Similarly, the desire to be punished can be a health expression of submissive tendencies, but it can also be a sign of serious mental illness and lack of self-esteem. Obviously, it's absurd to say that people with psychological illnesses cannot engage in health BDSM. For my boy, being submissive has been a route back to a sense of healthy self-esteem. And submissiveness can be a stress-release valve for this with high-pressure jobs. On the other hand, BDSM can be very unhealthy for those with profound self-esteem issues. I think one important test is why you're submitting to a dom. If you are submitting because you enjoy submitting (you find it a stress release, or you feel a lot of satisfaction at serving and making someone happy), then I think it's basically healthy. On the other hand, if you're submitting because you think you have no choice, because you think it's the only way you can find a partner, because you think you don't deserve better, or for any other reason that would be less than fully-consensual, then I think it's unhealthy. Put slightly differently, are you a battered woman (or man) or are you a joyful voluntary submissive? If your dom demanded you do something you truly didn't want to do (for example, your dom demands that you let a dog fuck you or that you rape a child), would you have the self-esteem to refuse? A submissive does, a battered spouse may not. I know subs that have a very strong sense of self-esteem but who desire punishment and humiliation.
So I guess the question is, if you want to be punished, is it because that arouses you, or because you feel so worthless that you don't think you deserve anything better? If the answer is the former, I think you're probably ok; if it's the latter, you should probably stay away from BDSM.