I looked over the ODNB article, which like many is close to the DNB article and it doesn't sound like he ever married, especially since a major source is Pepys' Diary who never mentions he was married. Also he was busy at sea in 1665 & 1666 so there probably wasn't a lot of time to get married.
The History of Parliament entry for her 2nd husband does have a source, Barry's Hants Pedigrees p. 75. The other source is the contradictory Westminster register entries w/o page numbers which Jo noted above. One thing I noted was his estate was seized by a creditor.
You can find references to a Sir William Berkeley in the Calendar of State Papers for Charles II, and I think he might be a different person because he's a captain of a company in an infantry regiment not a captain in the RN.
I think the HoP was based on Hants Pedigrees and it looks to me both are possibly errors. At this point you probably should just give up unless you are planning on publishing an article! Maybe someone published one you can find in JSTOR where this discrepancy was mentioned?