But I do think there are smart and dumb ways to go about it. For example, if you're going to make fun of former -- or current! -- sex partners or spouses then you shouldn't make it too obvious who you're talking about! This could have very unpleasant ramifications for them among other things.
And if you're talking about health struggles and the like I do think you can go overboard with it. In my opinion it's a good idea to have lots of jokes about other stuff. Because if you don't, then you could get pigeonholed as the woman who had a brain tumour, or the bloke who lost his testicle or whatever. Of course this might happen anyway, since journalists like simple, easy and emotive labels to give to people.
One comic who has done this is Tig Notaro. She's had all kinds of horrendous health and emotional struggles that she's used as raw material for comedy, and not so long after she went through them. These included having a double mastectomy as a result of breast cancer.
Choosing this approach has raised huge dividends for her career wise in one sense. She's garnered huge publicity and is now world famous. But it seems that pretty much every story you ever read about her online refers to her cancer struggles. This aspect of her life and comic persona have totally overshadowed all her other material it seems. And it as has rendered her beyond criticism.
She is a comedian, after all. So you're entitled to ask, is she funny? But given that she's this poster child for cancer survival the questions seems not just irrelevant, but almost offensive! My personal opinion from what I've seen of her is that she's not really funny at all. And I suspect that one of the reasons for this is that given what she'd gone through, no one has the guts to actually tell her the truth about her act. Call me heartless but I think that's a bad outcome for her and the audience.
That's why if you are a comic yourself and has some endured some similar health-related struggle I'd think long and hard about whether you want to use this in your act, or to promote your career. It could be great short term but end up being a millstone around your neck. It could be like being a child actor in a sitcom. Could be very hard to shrug off the association and branch into other areas.