"But by jingo," "by the living Jingo," in use before 1800 as expressions. I fail to see that it "was used in the context" of the 1878 expression of jingoism in the musical or Beaconsfield proposal.
The ca. 1846 usage has no meaning beyond "By gum" or any similar "non-blasphemous" expression.