Find a real relationship which can satisfy you outside of class? Or perhaps find faults in them that you can focus on and turn you off whenever you notice you are distracted? In the end, it would probably just take willpower.
_________________
When life leaves us blind,
Love keeps us kind.