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.
The veteran Confederates watch as the new VMI cadets hold their formation in the midst of murderous Yankee canon fire
Veteran 1: I'll be damned.
Veteran 2: If I didn't see it with my own eyes...