Suppose that person A expresses a criticism of person B, and person B responds by beating themselves up and spiraling downwards, which forces person A to drop their criticism and instead try to comfort person B to help them feel better. Is there a name for this type of behavior by person B?
They are engaged in self-flagellation, defined in Merriam-Webster as
: extreme criticism of oneself
The term literally referred to priests and monks who would beat (flagellate) themselves in penance for their sins (Wikipedia). Usage since has generalized to any kind of excessive self-criticism. Among 89 results in the Corpus of Contemporary American English, this example leapt out to me. It's from Slate's Dear Prudence, and applies to your situation well:
Late is better than never, and calling yourself " the worst " is less an apology and more a deflection designed to escape any criticism by conspicuous self-flagellation, and conspicuous self-flagellation does not fall under the subheading of Great Manners.