Authorship of 2 Samuel: The author is not mentioned in this book. However, it is ascribed that Samuel might have written chapters 1-24. The rest of 1Samuel and 2 Samuel also has unknown author. Again some suppose that Abiathar, the priest wrote it.

It is strongly believed that there were other materials had been collected from various author. 1 Chronicles 29:29 talks about 3 different writings.
1. Book of Samuel, the seer,

2. Book of Nathaniel, the prophet, and

3. Book of Gad, the seer.
Abiathar and Gad has access to the King’s court would have given these two book in it’s original form as ‘The Book of Samuel’.
Why do we have Samuel’s name in both books?

1 & 2 Samuel, in the original form, were one book called “The Book of Samuel”. Importance is given to Samuel because he was the transitional leader between period of Judges and the period of Kings. Samuel was the one who established the monarchy in Israel by anointing Saul and David. He was the king-maker.
Date of writing: These two books stated to be written after the division of Israel following Solomon’s reign in 931 B.C. REASON: 1 Sam. 27:6 “Ziklag has belonged to the king of Judah to this day.” So, it is believed that this book was compiled and edited with in years after Solomon.
Content:
This book of 2 Samuel is the history of the reign of king David. It relates his victories, the growth of the prosperity of Israel, and his reformation of the state of religion. With these events are recorded the grievous sins he committed, and the family as well as public troubles with which he was punished. We here meet with many things worthy of imitation, and many that are written for our warning. The history of king David is given in Scripture with much faithfulness, and from it he appears, to those who fairly balance his many virtues and excellent qualities against his faults, to have been a great and good man. –               Matthew Henry

2 Samuel also talks about the power play by Saul’s son Ishbosheth and Saul’s commander Abner. This was resolved by the deaths of both; but it took seven and one-half years to unify the nation under David (2 Sam 3:1). David unified the Nation both politically and religiously by bringing The Ark of the Covenant from Abinadab’s house to Jerusalem. (6:1-7:1).
Jesus Christ in 2 Samuel: The theme of coming King, the Messiah, is introduced as God establishes an everlasting covenant with David and his kingdom, “Your throne shall be established forever” (7:16).
Tidings brought to David of the death of Saul. (1-10): The blow which opened David’s way to the throne was given about the time he had been sorely distressed.

V. 2: Clothes torn and dust – are sings of deep grief, may be drama by the Amalekite to gain David’s favor.

Vs. 6-10: Saul’s death was recorded as a suicidal in 1 Samuel 31. Some Bible Scholars believe that this Amalekite most likely fabricated the story to present himself good before David to gain favor from David, who is likely to be crowned as King of Israel. But David was not happy that Saul was murdered by this man. He was not waiting to see the retribution of the wicked. Those who commit their cares and concerns to the Lord, will quietly abide his will. It shows that he desired not Saul’s death, and he was not impatient to come to the throne.

The Amalekite is put to death. (11-16):

Vs.11-12: Took hold of his own clothes…so did all the men: Again this is a sign of deep mourning.
V. 14: how was it you were not afraid to put forth your hand to destroy the LORD’s anointed?: David always considered Saul as God’s anointed, even though Saul was rejected by God, hated David, and sought to kill David. David did not touch him out of his respect to God.
V. 15: “…go near and execute him!” : If the Amalekite really killed Saul, he deserves the punishment for his action. As foreigner, a sojourner must adhear to the laws of Israel (Lev. 24:22) which means the Amalekite should have recognized the santity of Saul as his king. David refused to kill the anointed king, and Saul’s armor-bearer refused to touch him to kill (1 samuel 31:4&5).
If the Amalekite lied to David in this regard, still he deserves the punishment. So David’s action was not emotional.
V. 16: Your blood is on your own head: The Amalekite is responsible for his death because he dared to do what David refused to do twice.
David’s lamentation for Saul and Jonathan. (17-27):
V. 17: David lamented…: This is an expression of public and personal grief.
V. 18: The Song of the Bow…: Benjamites are highly talented in bow and arrow. So David was singing the song to signify the power and downfall of Benjamites. The book of Jasher… which means the book of Upright is the hymnal of Israel (Joshua 10:12-14).
V. 19, 25, & 27: How the mighty have fallen…: The mighty are Saul and Jonathan.
V. 17: tell it not in Gad, proclaim it not in the streets of Ashkelon…: These are the two major cities in Philistine. David can’t bear to think about the Philistine victory celebrations. This is the families internal matter and don’t let the enemy rejoice over our failure.