King David was divorced by his first wife Michal, who then married Phalti, so King David remarried to a woman called Ahinoam (I Samuel 25:43) after being divorced by Michal (I Samuel 25:44).
For this topic it is redundant to discuss whether Abigail or Ahinoam was the second wife of King David.
I Samuel 25:44 KJV
But Saul had given Michal his daughter, David's wife,
to Phalti the son of Laish, which [was] of Gallim.
The word divorce is not used, but it is obvious that when the king of a country, who has authority to dictate the law of the land, "puts an end" to a marriage and authorizes a new marriage: clearly the law of the land has organized for a divorce and remarriage to occur, regardless if it is a violation of the Law of God: Michal's choice to divorce David, to marry Phalti, was clearly sinful.
King David's marriage to Ahinoam was not adultery, the only time God complained to King David about adultery was with the famous incident with Bathsheba.
Some people support a double-standard, especially traditional Catholics, who think it was okay for King David to marry again after being divorced because God supposedly changes the rules over time, especially with the New Testament; so King David did fine with Ahinoam but if you do the same as King David, you are a dark-hearted, Hell-destined, evil monster!
Deuteronomy 17:17 KJV
Neither shall he multiply wives to himself, that his heart turn not away: neither shall he greatly multiply to himself silver and gold.
King David should have been well aware of Deuteronomy 17:17, but God did not complain about David's sin of marrying a new wife while the previous wife was still alive, until David committed adultery with Bathsheba; clearly the marriage with Ahinoam was valid.
I Corinthians 7:15 KJV
But if the unbelieving depart, let him depart. A brother or a sister is not under bondage in such cases: but God hath called us to peace.
The remarriage of King David after being divorced, seems compliant with the law as later publicly clarified by Paul in I Corinthians 7:15; remember that the law does not change (Matthew 5:18); David being himself a prophet, did not need the clarification of Paul to understand the limits of the Law of God.
Matthew 5:18 KJV
For verily I say unto you, Till heaven and earth pass, one jot or one tittle shall in no wise pass from the law, till all be fulfilled.
King David was free to remarry after divorce, because he was the innocent party that was divorced by an unbeliever; Michal was an unbeliever because she was against the prophet of God.
Before judging and condemning divorcées as "Hell ridden demon spawn," it is only fair that you say the same about King David, but do you personally know anyone more righteous than David?