Discourses JS, pg. 62-3; “A murderer, for instance, one that sheds innocent blood, cannot have forgiveness. David sought repentance at the hand of God carefully with tears for the murder of Uriah, but he could only get it through hell: he got a promise that his soul should not be left in hell. Although David was a king, he never did obtain the spirit and power of Elijah and the fulness of the priesthood; and the priesthood that he received, and the throne and kingdom of David is to be taken from him and given to another by the name of David in the last days, raised up out of his lineage.”
Ps. 51:1-4; “Have mercy upon me, O God, according to thy lovingkindness: according unto the multitude of thy tender mercies blot out my transgressions. 2 Wash me throughly from mine iniquity, and cleanse me from my sin. 3 For I acknowledge my transgressions: and my sin is ever before me. 4 Against thee, thee only, have I sinned, and done this evil in thy sight: that thou mightest be justified when thou speakest, and be clear when thou judgest.” (Also see 2 Sam. 12:13)
Just to prove we don’t pull things out of context here is another example of how the Mormons teach that David didn’t go to heaven. David of all people, can you imagine?