After David had committed adultery with Bathsheba and had Uriah murdered, Samuel laid out what God's judgment on David would be in II Sam 12:10-12,14. David would be beleaguered by people for his sin, justifiably in God's sight. In Psalm 51 David thoroughly repents and asks God not to cast him away. Other than Psalm 51, do any other of David's Psalms tie in with his sin with Bathsheba and Uriah? In many of the Psalms David asks God to save him from, and avenge him on, enemies who unjustly pursue, persecute and seek his life. Are any of these the same "enemies" that Samuel told him would make his life miserable because of his sin with Bathsheba and Uriah?
There were at least several years when Saul attempted to kill David before David officially became king shortly after Saul's death at Mt. Gilboa during the war with the Philistines, 1 Sam 31. The Bathsheba incident occurred long after David became king.
Therefore, the enemy in the other psalms may well refer to Saul. Examples are Ps 59, 34, and 52. (Source: The Psalms of David: David Fleeing Saul.)
In the Psalms, who is David asking God to save him from?
It depends on the specific psalm. David was a man of war and bloodshed. He had many enemies.
1 Chronicles 28:
3 But God said to me, ‘You are not to build a house for my Name, because you are a warrior and have shed blood.’
Berean Study Bible Psalm 35:
1 Of David. Contend with my opponents [plural], O LORD; fight against those [plural] who fight against me.
Are any of these the same "enemies" that Samuel told him would make his life miserable because of his sin with Bathsheba and Uriah?
Nathan pronounced judgement on David on his affair with Bathsheba and crime against Uriah in 2 Samuel 12:
You struck down Uriah the Hittite with the sword and took his wife to be your own. You killed him with the sword of the Ammonites. 10Now, therefore, the sword will never depart from your house,
These sins carried long-term consequences.
because you despised me and took the wife of Uriah the Hittite to be your own.’
11 “This is what the Lord says: ‘Out of your own household I am going to bring calamity on you. Before your very eyes I will take your wives and give them to one who is close to you, and he will sleep with your wives in broad daylight. 12You did it in secret, but I will do this thing in broad daylight before all Israel.’ ”
This one particular consequence was fulfilled only 4 chapters later in 2 Samuel 16:
22 So they pitched a tent for Absalom on the roof, and he slept with his father's concubines in the sight of all Israel.
There were other longer-term consequences unspecified.