You mentioned defamation. According to which country you live in there should be a way to sue around that and at least get a record that you have been a victim of cyber bullying, not necessarily the person you appear to be.
I strongly encourage you to do so if you can. I really hate people having such practice and thinking they can get away with it.
Otherwise/in the meantime the contracting idea works. Could be through a platform - i.e Upwork or Toptal - and/or behind a company name, etc. I'd also look into foreign opportunities.
This all sucks and I don't know what happened but look forward, some people don't want to give meaning to these things and would give you a chance. Good luck and take care!