Divorce is not encouraged as it should be the last resort.
If life is unbearable and the wife can’t live with such a man and she is certain not to give him his rights due to his attitude, she can ask for a divorce.
I advice before resorting to such a decision that she and her husband would go to a Muslim marriage counselor to see if there is any hope in restoring what was lost throughout the years. If he sees that there is no hope, divorce becomes a choice for the wife to take or reject.