For most of my life, when a relationship ended, primarily romantic ones, it took me a long time to recover, obsessing for ....years, yes, years! I truly wasted a lot of my life, precious time, obsessing, going over and over the causes, etc., for my perceived failure.
I don't know if you are on any type of medication, but, for me, an antidepressant was the cure. I have the tendency to obsess, if not over some
one, then most anything else that comes to mind. My family physician is very attuned to my natures, and keeps a tab on my tendency to obsess. The medication helps me greatly. There really is no sane reason for you to be obsessing about this teacher of 2.5 years ago. I, personally, am not a big fan of therapy....been there, done that. Talk, talk, talk, and not finding solutions. Medication was the cure for me. Check on that.