A Providence man has agreed to plead guilty to selling a deadly synthetic opiate and threatening a witness. In an agreement filed last week in US District Court in Providence, Victor Burgos, 20, agreed to plead guilty to charges he possessed and distributed acetyl fentanyl, a new kind of drug that has killed 14 people in Rhode Island this year. Burgos’s lawyer, Judith Crowell, said Monday that Burgos thought he was selling heroin. She said he has no connection to any of the deaths. Police said that after his arrest, Burgos made threats to the mother of an informant and told her he would spend the rest of his life in jail ‘‘because of all those overdose deaths.’’ Burgos is scheduled to change his plea next week.