The sentence "As if my head had decided to say yes for all eternity" is an example of a simile. A simile is a figure of speech that compares two unlike things using the words "like" or "as". In this case, the comparison is between the speaker's head and the act of saying yes for all eternity.