Allright. Hello guys, how are you all? I feel REALLY bad because everyone loved my story up until the end XD...yeah, sorry...it made sense in my mind.

Here's the explanation: The idea was that Medic kept having nightmares about respawn malfunctioning and everyone dying for real, so he needed to make sure himself that it was still working to put his mind at ease. So he sliced into his arm to have Engie take a look at the respawn chip to see that everything was in order, and then finally killed himself just to be 100% sure that nothing was wrong.
I tried to portray how much Medic actually cared abut his team even if he's never willing to admit it. Because the question arises: what if respawn really was down? What if the doctor's dreams really were telling him something? So he shot himself without hesitation, sacrificing himself in place of someone dying and not waking back up.
Then, since he knew that respawn was online and they were just nightmares, he was able to sleep again.
Sorry if this still makes zero sense, I did my best at explaining it.

Long story short: Medic had nightmares about respawn being down, and he made sure it was working, and when he realized it was, his nightmares stopped.

I really am sorry that it didn't make sense, guys...hopefully this helps.