(eNotes editors may only answer one question per response. If you need help with other emotions experienced in the story, please resubmit them as separate questions. Thanks.)
Gene doesn't truly come to realize during the time of the story how insecure he is in his relationship with Finny. What he does understand is that there are periods of time when he is thrilled to be Finny's best friend, times when he is grateful to share in Finny's enthusiasm for life.
There are other times, however, when Gene is consumed with jealousy of Finny, times when he can't understand how he ever allowed himself to be lulled into acceptance of Finny as a friend.
He had won and been proud to win the Galbraith Football Trophy and the Contact Sport Award, and there were two or three other athletic prozes he was sure to get this year or next. If I was head of the class on Graduation Day and made a speech and won the Ne Plus Ultra Scholastic Achievement Citation, then we would both have come out on top, we would be even, that was all...There were a swift chain of explosions in my brain, one certainty after another blasted-up like a detonation went the idea of any best friend, up went affection and partnership and sticking by someone and relying on someone absolutely in the jungle of a boys' school, up went the hope that there was anyone in this school-in this world-whom I could trust.
In the aftermath of the incident at the tree, Gene can't admit to himself what he did and why he did it, so he represses the entire episode. When Finny returns to school, Gene is amazed and relieved to discover that Finny not only does not hold any grudge or anger, but truly needs him and his friendship.
In hindsight, Gene came to understand that the war he fought was not World War II somewhere in Europe or Asia. His war had taken place on the Devon School campus, fighting an imaginary enemy who was, in the final analysis, himself.