1 Samuel 9:15 says that Saul was chosen to deliver Israel from the Philistines.
How is this compatible with how in 1 Samuel 31:6 and 7 is demonstrates that he killed himself due to a military defeat and they capture his dead body?
The 1st verse that you cited I Samuel 9:15 says that "Saul will save my people from the hand of the Philistines". That concept goes along with the beginning of the verse that says that Samuel is to appoint him as a "prince" over my people.
In the beginning, as in I Samuel 13 (kudos to @Menachem), he did defeat the Philistines and saved Israel from their oppression. Note that the concept of saving them does not imply permanently vanquishing them.
But view chapter 15, esp. verse 26 where Samuel sates very emphatically that G-d had rejected Saul from becoming king. See Malbim's commentary on this verse. Essentially, he states a few concepts:
1 - It was G-d that appointed Saul king, not the people. 2 - Because of this, he was certainly bound to listen to G-d's commandments rather than the people's demand (regarding taking the spoils from Amalek.) Thus, he should have refused the people's request instead of relenting to them. 3 - Because he rejected G-d's word while he was king, he is not fit to be the king.
Thus, the kingship was taken away from Saul and given to "a friend who is better than you" (See verse 28.)
Granted, that Saul could have saved Israel from the Philistines as a "citizen" without being king. But, it's a given that the people were looking for a leader and a king to do the job. If he's no longer king, what would have been the likelihood that the people would have listened to him?
Furthermore, it seems a logical deduction, that if G-d had rejected him from being the king and G-d had appointed him, how could the people go against G-d and make him a continuing leader after the fact?
In short, kingship was a requirement to be able to save the people from the Philistines. After all, that is also what the people had initially requested from Samuel, that they wanted a king, specifically. See Chapter 8 verse 20 that implies that the people wanted one of the king's roles to be someone to fight the wars for them.
Note that Saul did not kill himself. He requested his war-tool carrier to kill him. (A fact that David did not excuse, BTW. See beginning of II Samuel.) The reason is that he didn't want the Philistines to make a mockery of him and claim victory by saying that they killed the king. (Technically, he still was "king" even though David had been annointed.) I don't see this action as being incompatible with the idea of saving Israel. In a sense, he did just that by saving Israel's honor. Note, incidentally, that even in his weakened state without the official kingship, his maddened mental state, and the fact that G-d was not supporting him, Saul still attempted to fight the Philistines and save Israel from their oppression.