Borderline Personality Disorder (BPD) is characterized by affective instability, but self-injurious behavior appears to have an emotion-regulating effect. We investigated whether pain-mediated affect regulation can be altered at the neural level by residential Dialectical Behavior Therapy (DBT), providing adaptive emotion regulation techniques.