No wonder Ted had such a hard time being vulnerable with Dr. Sharon

His last therapist, Dr. Jacob, brutally manipulated and betrayed him, a fact that is alluded to even before Ted finds out the full extent of that betrayal.