Passage
Nevertheless, because thou hast given occasion to the enemies of the Lord to blaspheme, for this thing, the child that is born to thee, shall surely die.
Nevertheless, because thou hast given occasion to the enemies of the Lord to blaspheme, for this thing, the child that is born to thee, shall surely die.
2 Samuel 12:12 For thou didst it secretly: but I will do this thing in the sight of all Israel, and in the sight of the sun.
2 Samuel 12:13 And David said to Nathan: I have sinned against the Lord. And Nathan said to David: The Lord also hath taken away thy sin: thou shalt not die.
2 Samuel 12:14 Nevertheless, because thou hast given occasion to the enemies of the Lord to blaspheme, for this thing, the child that is born to thee, shall surely die.
2 Samuel 12:15 And Nathan returned to his house. The Lord also struck the child which the wife of Urias had borne to David, and his life was despaired of.
2 Samuel 12:16 And David besought the Lord for the child: and David kept a fast, and going in by himself lay upon the ground.
The verse centers on "nevertheless", "thou", "hast", "given", "occasion", "enemies", "lord", and "blaspheme". It is saying that the verse draws attention to "nevertheless" and "thou", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 13's "And David said to Nathan I have..." into verse 15's "And Nathan returned to his house The...", so "nevertheless" and "thou" belong inside that flow. In 2 Samuel context, the local focus is covenant, worship, and faithfulness.
A plain takeaway is to answer the verse's own emphasis on "nevertheless" and "thou" with trust shaped by these words, not by a vague optimism outside the passage.