The fact of Saul's suicide (or attempted suicide) may be deduced from the report of the Amalekite youth in the first chapter of 2 Samuel, which was originally not a separate book. The young man found Saul "leaning on his spear" and put the king out of his misery, as Saul had requested his armor bearer do in the previous chapter.
David said to the youth who was reporting to him, “How do you know that Saul and his son Jonathan are dead?” 6 The youth reporting to him replied: “I happened to find myself on Mount Gilboa and saw Saul leaning on his spear, with chariots and horsemen closing in on him... 9 Then he said to me, ‘Stand over me, please, and put me to death, for I am in great suffering, but still alive.’ 10 So I stood over him and put him to death, for I knew that he could not survive his wound. I removed the crown from his head and the armlet from his arm and brought them here to my lord.”
The report does not quite match the one in 2 Sam. 31, where Saul's armor bearer commits suicide after seeing that Saul had died. But the two reports do agree that Saul attempted to end his own life. The question arises as to whether the armor-bear was mistaken in thinking Saul was dead, or the Amalekite youth was lying in hope that David would reward him for his supposed role in his rival's death.
So the author of 1 Samuel probably knew of Saul's (attempted) suicide from this report, which was passed down to him. The narrator, a supporter of David, casts the Amalekite as embellishing the story to seek reward from David.