When my dd was 22m I shut her finger in a door which locked behind us.
I will never, the whole of my life, forget the horror of my child trapped and screaming. People bashing on doors and windows to get someone to come and unlock the door from the inside. People running around the building to get in from the other side. My total impotence to do anything for my child. And at the same time that small portion of ever-on-duty that was also trying to keep any eye on my dc1, make sure he didn't run off/see what was going on and be distressed, even though I couldn't do anything.
Ds's finger was broken, but she recovered completely, and there is absolutely no evidence on her hand or in her head that it ever happened.
But in my head: what if it had been 1cm higher, and her joint had been destroyed? What if it had been several fingers? What if it had taken longer to free her and she'd lost a finger? What if she had been long term traumatised by it?
But these things did not happen.
The accident that happened was what happened, not something else, something worse. When it happened I stepped up to the mark and looked after my child. As did dh. As did the strangers around us, who also looked after dc1 for us.
Because accidents happen in life. We have to dust ourselves off and keep going. We have to be thankful for the good things that happen, for recovery and support. Otherwise we drown in the fear and horror of what-if.
Much harder to handle, though, was the guilt: I did this to my child. How could I have been careless enough to let my child come to harm? But, again, it's an accident, part of life. Dd still loved and trusted me. Nobody judged me. I had not been wilfully careless. The only person who had to forgive me, was me. I think I've managed to do that. Of course, it would be much harder had dd suffered long-term damage. But I'd still have had to find a way. You can't live your life under such a weight.
And you can bet I am bloody, pedantically, fussy about fingers and door jambs now!
I hope your dc goes on to make a full recovery. Toddlers are phenomenally resilient, and the brains have the most amazing ability to recover completely.
Love him, love your other dc, and love yourself.
When one of those nasty, unhelpful thoughts intrudes, tell it "That's not what happened and that is not going to happen. Bog off and chuck your poison elsewhere. My kid is fine and I'm a good mum."