Economics and the self. A formalisation of Self-Determination Theory