Wa'alaikissalaam warahmatollaahi wabarakaatuh. May Allah bless you, forgive you, and give you the light (knowledge), and so all of us.
Here is a short answer based on my knowledge. I am not a student of shariah law, but I often listen to scientific (shariah) lectures. Actually any question should be asked to those who master the 'ilm (knowledge), i.e. ulema (scholar) or ustadz (teacher), so just take this QA site as a starting point instead of a fatwa.
وَمَا أَرْسَلْنَا مِن قَبْلِكَ إِلَّا رِجَالًا نُّوحِي إِلَيْهِمْ ۚ فَاسْأَلُوا أَهْلَ الذِّكْرِ إِن كُنتُمْ لَا تَعْلَمُونَ
And We sent not before you except men to whom We revealed [Our message]. So ask the people of the message if you do not know. (An-Nahl: 43)
In plain English: "And We sent you men to whom We revealed [Our message, e.g. Qur'an]. So ask the people who master the knowledge if you don't know."
Not only about shariah or deen, even dunya (world before afterlife) matter should be asked to those who know, e.g. health matter is asked to doctors.
Woman with no wali
In case that the woman don't have any wali, such as a (muslim) father, a (muslim) brother, and so on that complies the shariah [I mean there are chain of wali so if there is no the first then replaced by the second, if there is no the second then replaced by the third, and so on], so the wali is the (muslim) leader, such as the king or the president [originally it was the Chaliph, since today there is no Chaliph and muslims are divided to many countries, ulema said the king or the president is the leader]. Usually in muslim countries, such as Indonesia, a president delegates this task to his official in certain regions. In Indonesia there is Kantor Urusan Agama (religious affair office) and the official there will act as the wali for those women with no wali at all. So the marriage is legitimate/valid and it will not be a zina.
About the witnesses
There is no requirement that the witnesses should be from the family of the man.
Conclusion of law
I cannot conclude since I don't know if an imam is legitimate to act as a wali and I don't know the detail of your problem/life/environment.
Since you've divorced, even it was third divorce, and there is no going back, just take it as a lesson. You cannot do much about it because there is no relationship between you and him anymore. Even if the nikah was not valid, and so the divorce (was not valid too), you have no relationship anymore. If you have any child with him, it is better to discuss about the status of the child with ulema/ustadz, since if the nikah was not valid then the child is not considered as the man's child.
Because you have no relationship anymore, it is better you don't ever meet him again so you can heal your heart and meet a better man. It is heart, it "alternates back and forth". Our heart is Allah's so don't forget to ask Allah to fix it.
So you ask Allah for forgiveness, because He is Rahman and Raheem, and become a better muslimah. With this, maybe Allah wants to give you a lesson and encourage you to learn more, so you become a better person.
... إِنَّ اللَّهَ يُحِبُّ التَّوَّابِينَ وَيُحِبُّ الْمُتَطَهِّرِينَ
... Indeed, Allah loves those who are constantly repentant and loves those who purify themselves. (Al-Baqarah: 222)
The peace of soul is from Allah so ask Allah to give it. Trust me, Allah will never dump His servant who wants to be better. I suggest you to choose a better environment, full of good muslims.