A Darlington man’s obsessive-compulsive disorder played a part in the manner of his behaviour in a controlling relationship, a court heard.