In stanza 137 of the poem Hávamál, Odin describes how he once sacrificed himself to himself by hanging on a tree. The stanza reads:

I know that I hung on a windy tree
nine long nights,
wounded with a spear, dedicated to Odin,
myself to myself,
on that tree of which no man knows
from where its roots run.