"heart after X" is an idiom. In the Old Testament, the heart was the seat of higher reasoning (see cardiocentric hypothesis), and the kidneys, or the loins, were the seat of lower reasoning (base urges, sexual desire, conscience, etc) - it was believed that the kidneys were reproductive organs. (Fun Fact: in pre-classical ancient Greece, it was the liver that was the seat of higher reasoning, so when the eagles picked on Prometheus' liver, they were tormenting his mind).
So all the statements in the Old Testament about "heart after X", "I will give you a new heart", "the imaginations of my heart", "the thoughts of his heart", "he will say in his heart", etc. should be read with "mind" and the meaning will become clearer. The specific meaning of "X has a heart after God's own heart" means that X has an understanding of God's ways, and specifically a much more subtle and accurate understanding of the God's Law vis-a-vis their contemporaries.
To see this in action, Saul often did the wrong things without knowing they were the wrong things to do:
- not waiting for Samuel in 1 Sam 13:8-14
- making the foolish vow that almost got Jonathan killed in 1 Sam 14:24-26
- not killing the King of the Amalekites in 1 Sam 15:1-15
In each of these cases, Saul thought he was doing the right thing -- even the righteous or Godly thing, and he was completely wrong!
Therefore Saul lacked knowledge of God's ways, and it was this lack of knowledge that caused God to reject him.
Whereas David generally knew what the right thing to do was, even if he fell victim to his lower reasoning -- e.g. sexual desire for Bathsheba. It is this observation that David knew the right thing to do that is the meaning of "after God's own heart".
This contrast between the person who misunderstands compared to David who does understand continues with those who announce to David that they killed Saul (2 Sam 1:14-15) and then Abner (2 Sam 3:27-39) and finally Saul's son (2 Sam 4:7-12).
In each case, they thought they were doing the right thing. Twice David had them killed. Always that stupid grin "I did good, didn't I?" and always David has to shake his head and say "No, you did evil."
It is because of these episodes - and others - that we say that David's heart was after God's own heart.
Now over time, the cephalocentric view of the world as espoused by Heraclitus and Plato during the classical Greek period became dominant, and the seat of higher reasoning shifted to the mind, to the head. This was then brought to Israel with Hellenization in the wake of Alexander's conquests, but the scriptures were still the scriptures, and so instead of rewriting the scriptures to replace "heart" with "mind", the various expressions about the heart became idioms for the mind.
In the mind of Paul's audience, this was a widely held view and did not require any specific scriptural quotation, nor was it some deep secret revealed by the Holy Spirit. It was just David's reputation. It was enough that
David wrote so many Psalms
God declared to Samuel that he had chosen David for his heart:
7 But the LORD said unto Samuel, Look not on his countenance, or on
the height of his stature; because I have refused him: for the LORD
seeth not as man seeth; for man looketh on the outward appearance, but
the LORD looketh on the heart. 1 Samuel 16:7 (KJV 1900)
- David explicitly thanked God for revealing his (God's) heart to him by giving him knowledge
21 For thy word’s sake, and according to thine own heart, hast
thou done all these great things, to make thy servant know them. 2
Samuel 7:21 (KJV 1900)
- God, when explaining to Saul that he would be removed, promised to replace him with someone after his own heart:
14 But now thy [Saul's] kingdom shall not continue: the LORD hath sought him a
man after his own heart, and the LORD hath commanded him to be captain
over his people, because thou [Saul] hast not kept that which the LORD
commanded thee. 1 Samuel 13:14 (KJV 1900)
- David demonstrated his superior understanding of God's ways in the books of Samuel.
Therefore Paul in his summary: ‘I have found David, son of Jesse, to be a man after my heart, who will carry out all my wishes.’ is combining the above verses and in so doing, is reiterating what his listeners already believed.
Therefore Paul's statement only poses a problem for those who believe they must find exact old testament wording in a single verse for every verse in the New Testament referring to Israel's history. But in Paul's speech, 8 verses cover the period from Exodus to John the Baptist. As the sermons in Acts contain summaries of Israeli history in a few lines, you are rarely going to find such verses, and instead should read the sermons in acts as containing summaries of the themes of old testament books.