Why does this resistor affect this transimpedance circuit in this way?
Can someone explain why the amplifier rings or why it overshoots after clamping?


When the circuit is limiting (D2 and Q1's b-e junction forward biased), the loop gain is increased compared to when it is not limiting. (Think about it this way: The circuit limits by increasing the feedback gain so that the output doesn't have to swing as much to keep the inverting input at the same potential as the non-inverting input).

You'll need to do your stability analysis separately for the limiting and non-limiting cases. And possibly provide compensation that will be effective during limiting to eliminate the ring.