Why did he use that sword again and again after the first time his consciousness got taken over? Isn't getting your consciousness taken over would be the worst result ever? Worse than death even, because he apparently can still percieve his body's actions throughout the possession.
He should have tried approaching Ageha or Judith earlier. At least with these girls he can interact and talk, changing the variables immensely. Even though Ageha has multiple personalities, it's still better.
When everything in the goddamn place are all trying to kill you, fight or flight is a common response. Heck it might be even the only thing you can think to. The moment he sat down and calm down, he figured something out. It make sense honestly
I guess that's the problem, wasn't it? He didn't think.
Even though his current save point gave him ample time to calm himself and think things over.