If one accidentally spoke in the middle of pesukei d’zimra, one should just continue davening.
If the interruption was in the middle of a passuk, one should begin the passuk again. If shem HaShem was said, though, one should only go back to the beginning of the passuk if the phrase was an understandable phrase.
Extreme care should be taken not to speak between the end of baruch she’omar and the start of saying pesukei d’zimra, for it is possible that speaking would obligate one to repeat baruch she’omar! One should take care, in fact, not even to pause more than the usual pause.