The OED's definition of self-reference includes a mention of propositions and paradoxes, making it especially apt for your two examples:
Reference to oneself or itself; the direction of one's attention at
oneself, esp. in forming a comparative assessment of one's
characteristics or experience; spec. in Philos., the characteristic or
quality of referring to itself contained in certain paradoxes,
propositions, or statements.
To answer your question, then, I guess the act of self-reference is called a self-reference.
My favorite self-referencing paradox goes something like this:
