From Islam’s perspective temporary and permanent marriage have specific conditions, one of them is that when a woman wants to get married to someone she can’t be married to another person and that she must have finished the waiting period.
Another condition is that she has not committed adultery with the person she is planning to marry, at the time when she was married to another person; for committing adultery with a married woman makes that particular woman forbidden to him forever.
By observing the conditions mentioned above and a few other conditions the marriage of you and the father of your child will be valid.
Before thoroughly answering the question, noting this point is necessary that Islam dictates that no one has the permission to disclose and unveil his/her secrets to anyone. Islam believes that self respect and honor is so significant that everybody should only confess their sins before God Almighty and that too for the purpose to ask for forgiveness. Especially when a person has committed a sin without knowing it was a sin, which in this case there is a higher chance of being forgiven. God Almighty has assured sinners his forgiveness, in the Holy Quran, by saying: “Say: O my servants! who have transgressed against their own souls, do not despair of the mercy of Allah; surely Allah forgives all sins; surely He is the Forgiving the Merciful”. That means that if a sinner truly repents from his sins resolving never to commit that sin again, God will accept his repentance and bestow his mercy onto him.
Now regarding marriage, there are two types of marriage:
1. Permanent marriage,
2. Temporary marriage,
Each one these types of marriage consists of a set of conditions.
One of the conditions of marriage in general (temporary or permanent), is that a woman cannot already be in a marital relationship when getting married; meaning that if a woman was married to another person before, she must get divorced, or in the case of temporary marriage wait till the fixed term expires or is granted the remainder of the term (by the temporary husband), and in both cases, completing the idda’ (waiting period) of divorce or idda’ of temporary marriage, it is only after concluding idda’ that she can marry another person.
Another condition is for her not to have committed adultery with the person she is planning to marry, at the time when she was legally and Islamically married to another person (God forbid); for committing adultery with a married woman makes that particular woman haram to him forever.
The last point is that one of the conditions of temporary marriage is that the period must be distinct and clearly specified, so if it is, intentionally or unintentionally, not mentioned, the temporary marriage will be invalid and will automatically change to permanent marriage. The period in temporary marriage can be anywhere from a few minutes to several years, thus they must specify how long it is be; for example, it must be said how many hours, days, months or years it is to be.
Given that your situation meets all of these conditions and other conditions pertaining to this subject, your marriage with the father of your child will be valid.
Although you should know that the father of your child must be Muslim in order for you to be able to marry him; because jurists believe that a Muslim woman cannot marry a non-Muslim man.
For more information on this topic please see:
Marriage with a Married Woman after Committing Adultery with Her, Question 909 (Site: 994).
 If the husband of a woman who is over nine years of age and hasn’t reached menopause either, divorces her after having had intercourse with her, she must wait so that two menstrual periods pass her; once her third menstrual period commences, that will be the end of her waiting period and she can remarry.
If she is of the women who don’t have periods although she is in the age range of those who do have them, her waiting period will be after the end of three months from her divorce. Tawdih al-Masa’el (annotated by Imam Khomeini), issues 2511 and 2512.
 The waiting period for mut’ah is for the woman to have two menstrual periods, and for those who don’t have menstrual periods, it is 45 days. Tawdih al-Masa’el, (annotated by Imam Khomeini), pg. 526, issue 2515.
 Tawdih al-Masa’el, (annotated by Imam Khomeini), vol. 2, pp. 470-471, issues 2400, 2401 and 2402.
 Ibid, pp. 469-470, issues 2398 and 2399.
 Imam Khomeini, Tahrir al-Wasilah, vol. 2, pg. 290, issue 9.
 See: Tawdih al-Masa’el, (annotated by Imam Khomeini), vol. 2, pg. 468 and on.
 Ibid, issue, 2397.