The Spanish mismo for “same; self” comes from the Latin metipsimus meaning “same”. That word, in turn, comes from the combination of the Latin roots: met (just giving emphasis) and ipse (“himself; itself”) and the suffix -issismus (also adding emphasis; think “-ism” in English).
Here’s where it gets interesting: from that same Latin root, we get… lorem ipsum, the Latin phrase (still used in English!) that we use as the filler text when we don’t know what else to write, before the real wording comes in. Where does lorem ipsum itself come from? Well, Google around, there’s a lot written about that; but the exact phrase itself means “pain onto himself” (with the lorem short for dolorem — thus related to the Spanish dolor for “pain”!). So, we can see how the ipse that turned into mismo was also retained without change in lorem ipsum.
Not to mention… ipse dixit!