All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If your husband has really abandoned the prayer, then he is very sinful because abandoning the prayer is a grave major sin. Rather, some scholars are of the view that the person who abandons the prayer, even out of laziness, goes out of the fold of Islam. For more benefit on the ruling of a person who abandons the prayer, please refer to Fataawa 90785 and 88932.
He is also wrong by chatting with some non-Mahram women on the Internet. Indeed, you did well by advising him and you should continue to do so in a gentle manner and you should remind him of death and the Hereafter, it may be that Allaah enables him to repent.
As regards his marriage with a second wife, since this has already happened, then you should not preoccupy yourself with it. His marriage to her is not necessarily a punishment for a sin committed by you; it might just be a trial from Allaah so we advise you to be patient with it. For more benefit on the excellence of being patient, please refer to Fatwa 83577.
In any case, if you had committed sins, you are obliged to repent for having committed them. Allaah Says (what means): {And turn to Allaah in repentance, all of you, O believers that you might succeed.} [Quran 24:31]
Indeed, there is nothing that happens in the universe except with the Predestination of Allaah, among which is the marriage of your husband to this woman. He has the right to marry her even if he does not love her, let alone if he loves her. The Prophet said: "The best solution for those who love each other is to marry." [Ibn Maajah] Nonetheless, your husband is obliged to be just between you and her.
With regard to the letter which you mentioned in the question, if he had send it to her after his marriage to her, then he should not have sent it to her with this story, and if this was before he married her, then he is sinful.
As regards your asking his second wife to stay away from her, then if this was after he married her, then this is not permissible. The Prophet said: ''It is not lawful for a woman to ask for the divorce of her sister (i.e. the other wife of her husband) in order to have everything for herself.’’ [Al-Bukhari and Muslim] However, if this happened before he married her, then you are right in advising her to stay away from your husband.
In fact, it is natural for a wife to wish that her husband be exclusively for her but she has to be patient if her husband marries a second wife. The two wives of the same husband should deal with each other in kindness but if you fear harm from her or you fear to harm her, then it is more appropriate to stay away from her.
Furthermore, it is not permissible for a woman to ask her husband to divorce her without a sound reason, but if your husband continues to abandon the prayer, then it becomes permissible for you to ask him to divorce you because of his dissoluteness, but you should not hasten to this as he might repent and it might be more beneficial to be patient with him rather than separating from him.
Allaah Knows best.