also doggone, colloquial minced epithet, by 1849, Western American English, a "fantastic perversion of god-damned" [Weekley]. But Mencken favors the theory that it is "a blend form of dog on it; in fact it is still often used with it following. It is thus a brother to the old English phrase, 'a pox upon it,' but is considerably more decorous." Dog on it was the usual early spelling, so it was perhaps at least felt as such by those using it.
But there are many examples of similar words serving as euphemistic perversions of God: Compare dod for "God" in many oaths (late 17c. through 19c.); dodgasted (probably "God-blasted," in use late 19c., early 20c.); dod-rot (1842).