Eligibility Details:  
        Inclusion Criteria:
          -  MST+DBT Group
               1. English-speaking and able to provide informed consent to participate in the study
               2. Female and between the ages 18 and 50 years
               3. Current DSM-IV (Diagnostic and statistical manual of mental disorders-IV)
                  diagnosis of BPD based on the International Personality Disorder Examination BPD
                  Section (IPDE-BPD)
               4. Current DSM-IV diagnosis of a non-psychotic, major depressive episode, as part of
                  a broader diagnosis of MDD (single episode or recurrent episode), based on the
                  Structured Clinical Interview for DSM-IV Axis I Disorders—Patient Edition
                  (SCID-I/P)
               5. Score > 9 (equivalent to moderate-to-severe suicidal ideation) on the Modified
                  Suicidal ideation Scale for at least the two weeks prior to enrolling in the
                  study
               6. Hamilton Rating Scale for Depression (HRSD-24) score > 22 (classified as Very
                  Severe Depression)
               7. Failed to achieve a clinical response to adequate treatment trials of two or more
                  antidepressants during the current depressive episode OR have been unable to
                  tolerate at least two antidepressants as assessed by the Antidepressant Treatment
                  History Form (ATHF)
               8. Deemed appropriate to receive ECT as assessed by an ECT attending psychiatrist
                  and an anesthesiologist
               9. Meets the MST safety criteria
              10. Agreeable to keeping their current antidepressant treatment (if any) constant
                  during the intervention (unless clinically indicated)
              11. Has a close family member, friend, partner, or qualified chaperone able and
                  willing to accompany the patient home after each MST treatment session and
              12. Able to adhere to the intervention schedule.
          -  DBT-Only Group
               1. English-speaking and able to provide informed consent to participate in the study
               2. Female and between the ages 18 and 50 years
               3. Current DSM-IV diagnosis of BPD based on the International Personality Disorder
                  Examination BPD Section (IPDE-BPD)
               4. Current DSM-5 diagnosis of a non-psychotic, major depressive episode, as part of
                  a broader diagnosis of MDD (single episode or recurrent episode), based on the
                  Structured Clinical Interview for DSM-IV Axis I Disorders--Patient Edition
                  (SCID-I)
               5. Score > 9 (equivalent to moderate-to-severe suicidal ideation) on the Modified
                  Suicidal ideation Scale for at least the two weeks prior to enrolling in the
                  study
               6. Baseline Hamilton Rating Scale for Depression (HRSD-24) score > 22
               7. Failed to achieve a clinical response to adequate treatment trials of two or more
                  antidepressants during the current depressive episode OR have been unable to
                  tolerate at least two antidepressants as assessed by the Antidepressant Treatment
                  History Form (ATHF)
               8. Agreeable to keeping their current antidepressant treatment (if any) constant
                  during the study (unless clinically indicated)
        Exclusion Criteria:
          -  MST+DBT Group
               1. Acute suicidal intent that requires hospitalization to protect harm to self
               2. Any unstable medical and/or neurological condition
               3. Currently pregnant or lactating, or intention to get pregnant during the duration
                  of the study
               4. Not considered sufficiently physically healthy to undergo general anesthesia for
                  any reason
               5. Any significant neurological disorder or condition likely to be associated with
                  increased intracranial pressure or cognitive impairment (e.g., a space occupying
                  brain lesion, a history of stroke, a cerebral aneurysm, a seizure disorder,
                  Parkinson's disease, Huntington's chorea, multiple sclerosis)
               6. Medical condition, medication, or laboratory abnormality that could cause a major
                  depressive episode or significant cognitive impairment in the opinion of the
                  investigator (e.g., hypothyroidism with low thyroid-stimulating hormone (TSH),
                  rheumatoid arthritis requiring high dose prednisone, or Cushing's disease)
               7. Current diagnosis of delirium, dementia or another cognitive disorder secondary
                  to a general medical condition
               8. Diagnosis of a developmental disorder (e.g. Down syndrome, autism-spectrum
                  disorder)
               9. Non-correctable clinically significant sensory impairment (i.e., cannot hear or
                  see well enough to complete the neuropsychological tests)
              10. Lower than eighth-grade reading level as assessed by the Wide Range Achievement
                  Test—Fourth Edition
              11. Alcohol or substance use disorder (relating to opioids or cocaine) currently or
                  within the past 1 month
              12. Diagnosis of a DSM-5 psychotic disorder
              13. Demonstrated a lack of response to ECT during the current or prior depressive
                  episode.
              14. Requires a benzodiazepine with a dose equivalent to lorazepam 2 mg/day or higher
                  or any anticonvulsant due to the potential of these medications to limit the
                  efficacy of both MST and ECT
              15. Intracranial implant (e.g., aneurysm clips, shunts, stimulators, cochlear
                  implants, or electrodes) or any other metal object within or near the head,
                  excluding the mouth, that cannot be safely removed
              16. Has sustained a moderate-to-severe head injury (defined as ≥ 20 min loss of
                  consciousness and/or > 24 hrs post-traumatic amnesia); or
              17. Does not qualify for MRI scanning
          -  DBT-Only Group
               1. Acute suicidal intent that requires hospitalization to protect harm to self
               2. Any unstable medical and/or neurological condition
               3. Currently pregnant or lactating, or intention to get pregnant during the duration
                  of the study
               4. Any significant neurological disorder or condition likely to be associated with
                  increased intracranial pressure or cognitive impairment (e.g., a space occupying
                  brain lesion, a history of stroke, a cerebral aneurysm, a seizure disorder,
                  Parkinson's disease, Huntington's chorea, multiple sclerosis)
               5. Medical condition, medication, or laboratory abnormality that could cause a major
                  depressive episode or significant cognitive impairment in the opinion of the
                  investigator (e.g., hypothyroidism with low TSH, rheumatoid arthritis requiring
                  high dose prednisone, or Cushing's disease)
               6. Current diagnosis of delirium, dementia or another cognitive disorder secondary
                  to a general medical condition
               7. Diagnosis of a developmental disorder (e.g. Down syndrome, autism-spectrum
                  disorder)
               8. Non-correctable clinically significant sensory impairment (i.e., cannot hear or
                  see well enough to complete the neuropsychological tests)
               9. Lower than eighth-grade reading level as assessed by the Wide Range Achievement
                  Test--Fourth Edition
              10. Alcohol or substance use disorder (relating to opioids or cocaine use) currently
                  or within the past 1 month
              11. Diagnosis of a DSM-5 psychotic disorder
              12. Intracranial implant (e.g., aneurysm clips, shunts, stimulators, cochlear
                  implants, or electrodes) or any other metal object within or near the head,
                  excluding the mouth, that cannot be safely removed
              13. Has sustained a moderate-to-severe head injury (defined as ≥ 20 min loss of
                  consciousness and/or > 24 hrs post-traumatic amnesia)
              14. Does not qualify for MRI scanning