Desmayar, meaning “to faint” is — unexpectedly! — related to the English word, dismay.
Both come from the same Old French root, esmaier, which meant “to trouble, disturb”. (This, in turn, comes from the Latin ex-magare, in which the magare means, “to be powerful” and is related to the English, “might” and “may.”)
Thus, both fainting and being in total shock (dismayed!) are both just ancient manifestations of being troubled at something.