i can explain why he abused her and treated her so horribly but explaining and justifying it are two different things, because what he did to her is not right or reasonable in anyway.
***tl;dr at the bottom***
so before harley quinn, joker had almost never been written to experience love or compassion or any other pesky shit that comes with being in love. he might as well have not had those emotions at all.
unfortunately for the trash prince of crime, while on the conquest for his next ‘get out of arkham free’ card, he met harleen quinzel. now we all know that she fell for joker during their sessions together, but HE also was catching feelings for HER in the process too, like a cinderblock to the face. that isn’t very clear in mad love, which is the very first comic to show their relationship before they were partners in crime (it’s an outdated book on their relationship imho). but it’s a more apparent that he was developing an emotional attachment to harley in her first comic appearance (outside of the btas tie-ins), her solo comic run, and the no man’s land arc. when exactly these emotions for surfaced isn’t pinpointed, but harley’s solo run and no man’s land hint to the fact that it was during their sessions as well.
now as i mentioned, joker was almost never written as feeling romantic love prior to harley quinn - there’s a comic where he goes “sane” and finds a girl but that’s another meta post for another time - so when she elicited such strong emotions in him, it was strange and new and he didn’t like it. according to him, his emotions for her we’re getting in the way of being a villain and taking his stake in gotham. as a result he fashioned the perfect plan to revert the big bad villain he once was: get rid of the person giving him strange, new feelings and the feelings would go away with that person. so tried to do just that through abusing her and trying to kill her. he had no idea how to deal with the new emotions he was having for her other than to resort to violence.
tl;dr: harley made joker feel so much for her that it distracted him from being a villain and he felt the only solution was to get rid of her by treating her horribly and trying to kill her.