Do sarcasm and "dark humour" help you?..

I mean, our life is probably sucks because of our issues so many probably tend to think negatively being overall pessimistic. But sometimes you can find some "positive" things about our inferiority. Like thinking that it's good to have no friends because you won't feel used or secretly made fun of. No one (I mean, important people for) will betray or reject you. Or staying all day at home so that you won't get in any trouble. Yes, these don't seem "humorous" in any way but it's possible to be sarcastic at times. When I say "dark humour" I don't exactly mean smth offensive but again things like "It's good to still live with your patients - at least you aren't dying under a bridge with the local junkies". You name it. Or about your previous (negative) experience with people like "They might call me a weirdo at school but at least they didn't spit in my face or beat me up in the alleyway". Yes, sounds very toxic, sorry. I'm just curious