Just a guess:
Gaeta is the fifth Cylon. He finds out about his Cylonity just before he returns to workin the CIC, just before the Colonial-Rebel forces blow up the Resurrection hub. When he recognizes that he is a Cylon, he realizes that he could be resurrected with a complete leg. But his last chance, his only chance, to become a whole person again is about to be destroyed. He figures this is the last straw -- he's been frakked over by the Colonial civilization for far too long. In the CIC, he unholsters his weapon and points it at his own head, threatening to kill himself unless the attack is called off. The attack is called off, and Gaeta kills himself anyway. Since he's the only one who knows he's a Cylon, everyone things he just snapped and killed himself. Gaeta resurrects on the Cylon ship. Realizing that he can't go back, and feeling that he doesn't want to go back, he joins the 1,4,5 faction against the Colonial-Rebel alliance and becomes their leader.