Much of the actual mechanic is at [Madness]. You can put a pretty table of your sanity stats into your character sheet like this: