Hi,
If you have already been granted permanent residency I don't believe it will be affected by Divorce. That said if you are filing for divorce and you claim that you separated whilst applying for permanent residency, noting you need to prove 12 months separation to apply, then that might be a problem. I say this because you would have been required to notify immigration of any changes in your situation.