I’m sorry to hear you are having this problem. I would document specific dates and times or his harassing behavior. This can be used with both your landlord and the police. I would talk with the landlord frankly. Explain what he is doing, what you understand to be true, and how it makes you feel. If the harassment constitutes illegal action, I would report him to the police. If he is on probabstion for harassment then it won’t take much for him to end up in jail.
However, I don’t understand why he hasn’t been evicted. It makes no financial sense for a landlord to allow a tenant to remain in his building at the expense of multiple other units. The margins on rental buildings would cause any building with multiple long term empty units to be a losing money venture. My wife and I want to buy a multi unit building and one reason we haven’t is precisely this. Even if you own the building outright, it makes little financial sense to allow multiple units to lay vacant. Are you positive the landlord is fully aware of this tenants behavior and that he is in fact responsible for the empty units?
From a personal standpoint, I would also work especially hard on not letting this guy get to you and not showing it. His behavior, like any troll, is empowered by the reactions he gets. If you can take away that power, he loses and hopefully eventually he stops. If he is mentally ill then he may never stop, but you will be happier if you can ignore his behavior.