Pain Resistance increases the rate Stun damage passively decays by over 50%, and every next level increases it by a progressively smaller amount.
This should not be confused with active Stun damage recovery, which depends on the % of Freshness and Health remaining.
Outfits and races with special Stun recovery rules override these formulas.