First of all, we ask Allah to make you steadfast in Islam and to make things easy for you, and to choose for you that which is best in this world and in the Hereafter.
Remember that the blessing of adherence to this great religion should not be spoiled by anything that your husband does to you. Such things happen in many families, but the laws and rulings of Islam contain nothing but that which is in the best interests of the individual, the family and society, and the one who goes against them is not harming anyone but himself. Islam has nothing to do with his actions.
The first man did you a favour by calling you to Islam, and we ask Allah to reward him for that with the best reward.
But now he should understand that things have changed. Now you are married to another man, so he should stop corresponding with you and talking to you.
You should understand that spoiling a woman's relationship with her husband is something that is forbidden and is in fact a major sin.
Continuing to correspond with you is spoiling the relationship between you and your husband.
What you should do is to be patient in putting up with your husband and do not be hasty in seeking divorce.
Try to treat your husband kindly and nicely. This is among the most important means of making him change and begin to treat you properly.
Look for an opportunity at the right time to speak to him about adhering to the rulings of Islam and remaining steadfast therein, and remind him that this is the way to true happiness in this world and the Hereafter, in order to set things straight between you and so that your daughter may receive a sound upbringing with both of her parents.
As for the idea of marrying your first friend, you do not know whether that would be better or not. Oftentimes a person thinks that something would be better for him when in fact it is the opposite. And Allah, may He be exalted, says (interpretation of the meaning):
and it may be that you dislike a thing which is good for you and that you like a thing which is bad for you. AllÃ¢h knows but you do not know
We ask Allah to set your affairs straight.
And Allah knows best.
Reproduced from Islam QA