Can be used in two different ways. One way being shock or surprise. The other way is more of a stubborn, selfpride thing meaning you refuse to do something, say something, believe something, etc.
Well, I'll be damned. Kenny fell in love with a hoe.
I'll be damned if I stress over some girl.