Thus my heart was grieved; literally, for my heart was grieved, or "was soured." The "for" refers to a suppressed phrase of self-condemnation, "But at the time I did not see all this—the solution did not present itself to me."
I was too full of grief and bitterness to consider the matter calmly and dispassionately. And I was pricked in my reins; i.e. "a pang of passionate discontent had pierced my inmost being" (Cheyne).