Almost every single psychology professor warned the class about what Ferb is doing. Most of my professors called it "medication student syndrome" as medication students do this to a huge extent. "This" is self diagnosing with very dire disorders and then telling people, especially parents, when you want to shock or manipulate them.
I would mostly ignore it. There will be more of these if he takes more classes.
In fact, some of this "sociopath" diagnosis may be due to his relationship with this teacher. He may feel guilt over the relationship, or not feel guilt and think he should feel guilt, and think having this diagnosis is a way to punish himself. Or it may not be. I just know it was the kind of thing my brother did at Ferb's age when he felt guilty over something. Ferb reminds me of my brother at that age in many ways. By doing something like this to deal with the guilt, he wouldn't have to apologize.
Sociopaths don't apologize or feel guilt, so Ferb doesn't have to admit that he does. It is a way to handle what he has done now that he is away from the relationship and around peers who he may have told about the relationship. Maybe he didn't get the reaction he expected from his peers, especially if he wanted them to think this was a wonderful thing. Maybe the peers were even upset by the way he treated you and your things, which would have gotten him thinking.
Stuff like this was always under the surface with my brother. He almost never let it come to the surface, but it was there. I can see Ferb not getting the reaction from his peers that he expected, feeling guilty, then not wanting to admit it even to himself. So he shoved that guilt way down, and found the definition of a sociopath in his textbook and decided he would say he was one.
The more reaction you give him, the more of this nonsense he will dump on you. Telling him to talk to his therapist was a great idea. Other than that, be very nonchalant about any of this that he brings to you. Rather as if he told you he has a nose on his face. Treat these things as if they are that earth shattering. Eventually he will either get over them or end up talking to you to see why you are not giving him the reaction he wants. Then you can actually talk to him. Maybe.
I am sorry that you have to deal with this too. At least it shows he is reading at least one of his textbooks.