The basic structure is "If anything, short of X, could Y, it was Z". This mean that Z was the only thing (or one of the few things), other than improbable X, that could achieve difficult thing Y. "being in a different relation to everyone around me, Pegotty excepted" means "having a different relationship to everyone around me, other than Pegotty".
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.