When mental disorders and substance abuse both occur in a person then it can be very difficult to determine which of these problems came first, and which is caused by the other condition. This is the old chicken and the egg puzzle, because substance abuse can cause mental disorders but individuals who have mental illness may use drugs or alcohol to self medicate the symptoms that they experience. Treatment for either problem can not start until an accurate dual diagnosis can be determined. The treatment that is recommended will depend on whether the mental disorders are causing the substance abuse or if it is the other way around in your case. If you have both conditions then you need to find a treatment program which can address all of your symptoms and problems, otherwise you will have a much higher risk of relapse and you may need future rounds of treatment.
There are treatment programs which address both mental disorders and substance abuse issues, and these are usually the best choice if you have or suspect a dual diagnosis. Medical professionals can determine which mental disorders that you have, and provide treatment for your substance abuse at the same time. Some programs may treat one issue or the other but not both at the same time, and this is a mistake. You can not reach a full and complete recovery if all of your problems and issues are not addressed, and this means knowing what these are and then treating them effectively.