Can the second wife pray against the first wife because she is mistreating her?
Question

My husband has divorced me, after just eleven months of marriage!
My question is: 
My heart is burning because he preferred his first wife over me, despite the fact that she wronged me and mistreated me. Is it haraam to pray for something bad to happen to her? Because I feel that I have no one but Allaah to defend me and settle scores for me. So I say all the time, “Allaah is sufficient for me and He is the best disposer of affairs. O Allaah, compensate me for my calamity and compensate me with something better than that.” And I say, “O Allaah, support me against the one who has wronged me, and avenge me,” and in fact I mean it.
Praise be to Allah.Firstly: 
Allaah and His Messenger have warned us against wrongdoing. Allaah says (interpretation of the meaning): 
“Consider not that Allaah is unaware of that which the Zaalimoon (wrongdoers) do”
[Ibraaheem 14:42]
And the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Beware of wrongdoing, for wrongdoing will be darkness on the Day of Resurrection.” Narrated by Muslim, 2578. 
One of the worst forms of wrongdoing is a husband’s mistreatment of his wife, and not treating co-wives fairly. 
The Prophet (peace and blessings of Allaah be upon him) said: “Whoever has two wives and inclines towards one of them, will come of the Day of Resurrection with half of his body leaning.” Narrated by Abu Dawood (2133); classed as saheeh by Ibn Hajar in Buloogh al-Maraam, 315. 
Al-Dhahabi (may Allaah have mercy on him) said in al-Kabaa’ir (p.109): 
Wrongdoing includes wronging a woman with regard to her dowry, spending and clothing. End quote. 
‘Abd-Allaah ibn Mas’ood (may Allaah be pleased with him) said: 
A man and a woman will be taken by the hand on the Day of Resurrection and a voice will call out before the first and the last, saying: ‘This is So and so the son of So and so. Whoever has any dues from this man let him come and take his dues,’ and the woman will rejoice if she had any (unfulfilled) right over her father, or over her son, or over her brother, or over her husband.” Then Ibn Mas’ood recited the verse (interpretation of the meaning): 
“there will be no kinship among them that Day, nor will they ask of one another”
[al-Mu’minoon 23:101] 
Allaah will forgive whomsoever He will with regard to His own rights, but He will not forgive with regard to the rights of other people. 
Narrated by al-Tabari in his Tafseer, 5/90. 
Secondly: 
Allaah has granted a concession to the one who has been wronged, allowing him to settle scores with the one who wronged him in this world; that is allowed only to an extent commensurate with the original wrong, with no transgression, overstepping the mark or wrongdoing. 
Allaah says (interpretation of the meaning): 
“Allaah does not like that the evil should be uttered in public except by him who has been wronged. And Allaah is Ever All‑Hearer, All‑Knower”
[al-Nisa’ 4:147]
Ibn Katheer said in al-Tafseer (1/572): 
Ibn ‘Abbaas said concerning this verse:
Allaah does not like anyone to pray against anyone else, except if he has been wronged, in which case He has granted a concession allowing him to pray against the one who wronged him. That is the words “except by him who has been wronged”. But if he bears it with patience that is better for him. End quote. 
Allaah says (interpretation of the meaning): 
“And indeed whosoever takes revenge after he has suffered wrong, for such there is no way (of blame) against them.
42. The way (of blame) is only against those who oppress men and rebel in the earth without justification; for such there will be a painful torment”
[al-Shoora 42:41-42] 
“And those who, when an oppressive wrong is done to them, take revenge”
[al-Shoora 42:39]
It was narrated that some of the Sahaabah prayed against those who had wronged them. 
When a man from among the people of Kufah accused Sa’d ibn Abi Waqqaas (may Allaah be pleased with him) of something of which he was innocent, Sa’d said: “I will pray for three things: O Allaah, if this slave of Yours is lying, and did this to show off, then give him a long life, make him live a life of poverty and expose him to temptations.” After that, the man used to say: “An old man who has been tempted; the du’aa’ of Sa’d affected me.” Narrated by al-Bukhaari, 755; Muslim, 453. 
It was narrated from Muhammad ibn Zayd from Sa’eed ibn Zayd (may Allaah be pleased with him) that Arwa (a woman) had a dispute with him concerning part of his house. He said: “Let her have it, for I heard the Messenger of Allaah (peace and blessings of Allaah be upon him) say: ‘Whoever takes a handspan of land unlawfully, his neck will be encircled with it down the seven earths on the Day of Resurrection.’ O Allaah, if she is lying then make her blind and make her grave in her house.” He said: and I saw her blind, clinging on to the wall, saying, “The du’aa’ of Sa’eed ibn Zayd affected me.” Whilst she was walking in the house, she came to a well that was in the house and fell into it, and it became her grave. Narrated by Muslim, 1610. 
Al-Nawawi said in Sharh Muslim, 11/50. 
The hadeeth of Sa’eed ibn Zayd (may Allaah be pleased with him) shows that it is permissible to pray against an aggressor or wrongdoer. End quote. 
If the one who has been wronged prays against the one who wronged him, he should not go to extremes in that and should not overstep the limits prescribed by Allaah. 
Al-Hasan al-Basri said: 
He should not pray against him, rather he should say, “O Allaah, help me against him and give me my right from him.” 
According to another report he said: He has been granted a concession allowing him to pray against the one who has wronged him, without transgressing the limits against him. End quote. 
Tafseer Ibn Katheer, 1/572. 
The best du’aa’ that the one who has been wronged can say is that which was narrated from the Prophet (peace and blessings of Allaah be upon him): 
It was narrated that Jaabir (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) used to say: “O Allaah, make my hearing and my sight strong, and make them my heirs (i.e., keep them strong until I die), and support me against the one who has wronged me, and avenge me.” Narrated by al-Bukhaari in al-Adab al-Mufrad, 1/226; classed as saheeh by al-Albaani in Saheeh al-Adab al-Mufrad. 
It was narrated from Ibn ‘Umar (may Allaah be pleased with him) that the Prophet (peace and blessings of Allaah be upon him) rarely left a gathering without saying this du’aa’ for his companions: “O Allaah, give us a share of fear of You that will keep us from disobeying You… and grant us revenge over those who have wronged us, and grant us victory over our aggressors.” Narrated by al-Tirmidhi, 3502; classed as hasan by al-Albaani in Saheeh al-Tirmidhi. 
Thirdly: 
Even better than that is to forgive and leave the matter of the wrongdoer to Allaah, may He be exalted, on the Day of Resurrection. The one who forgoes his right in this world will take it in abundance in the Hereafter, and his heart will be freed from resentment and grudges. 
Al-Bukhaari entitled a chapter in his Saheeh (2/864): 
Chapter: The one who has been wronged forgiving because of the verses in which Allaah says (interpretation of the meaning): “Whether you (mankind) disclose (by good words of thanks) a good deed (done to you in the form of a favour by someone), or conceal it, or pardon an evil, verily, Allaah is Ever Oft‑Pardoning, All‑Powerful” [al-Nisa’ 4:149], “The recompense for an evil is an evil like thereof; but whoever forgives and makes reconciliation, his reward is with Allaah. Verily, He likes not the Zaalimoon (oppressors, polytheists, and wrongdoers)” [al-Shoora 42:40] and “And verily, whosoever shows patience and forgives, that would truly be from the things recommended by Allaah” [al-Shoora 42:43]. End quote.  
The Prophet (peace and blessings of Allaah be upon him) said: “O ‘Uqbah ibn ‘Aamir, uphold ties with the one who cuts you off, give to the one who withholds from you, and forgive the one who wrongs you.” Narrated by Ahmad, 4/158; classed as saheeh by al-Albaani in al-Silsilah al-Saheehah, 891. 
It was narrated that ‘Aa’ishah (may Allaah be pleased with her) said: a blanket of hers was stolen, and she started to pray against the one who had stolen it, and the Prophet (peace and blessings of Allaah be upon him) said: “Do not reduce the burden of his sin.”
Narrated by Abu Dawood, no. 1497; classed as saheeh by al-Albaani in Saheeh al-Targheeb, 2468. 
Conclusion: 
It is not permissible for a husband to wrong his wife, whether she is his only wife or she has a co-wife. It is permissible for the one who has been wronged to pray against the one who has wronged him, but it is not permissible for him to transgress in his du’aa’. And better than saying such a du’aa’ is to forgive.
And Allaah knows best.