Most likely, he was experiencing dissociative fugue as a result of trauma.

Cid's father, Midas nan Garlond, was the Imperial Minister of Industry, a famous engineer in charge of advancing Garlemald's technology. When House Darnus resurrected the use of Allag magitek, substituting magickal power with ceruleum fuel as a drive mechanism, this became the primary focus of Imperial engineers. Cid, like his father, was a prodigy - but when his father became enthralled with the Meteor project, the two became quite distant. Cid spent a lot of time in the capital, where Gaius van Baelsar took over some of the parental responsibilities Midas was neglecting - guiding and honing his abilities and ideology towards Imperial interest. Cid, in turn, developed better, more efficient killing machines for the Empire until he realized that they would use them ruthlessly through any means that led to their desired end. The Meteor project led to his father's death and annihilated an entire city, leading Cid to snap out of it, so to speak, and defect to Eorzea, partly in hopes of redeeming himself and preparing them to defend against the machines he himself created.

The Battle of Cartenau, where the VIIth Legion met the Alliance and Dalamud fell, is the point where it all culminated for him and it seems he couldn't handle the trauma. It's possible that he was affected by the same selective memory-wipe that happened to everyone else in terms of the Warriors of Light, but to a more extreme degree, but for now I think it was just fugue.