What should be clear
I guess that the two life's mentioned in this verse must be clear:
The point that might cause trouble are the two deaths.
قَالُوا رَبَّنَا أَمَتَّنَا اثْنَتَيْنِ وَأَحْيَيْتَنَا اثْنَتَيْنِ فَاعْتَرَفْنَا بِذُنُوبِنَا فَهَلْ إِلَى خُرُوجٍ مِنْ سَبِيلٍ
A linguistic dive
Note that the noun:
الموت al-Mawt
and it's corresponding verb:
مات maata
Which is usually translated by death and to die means in Arabic a bit more:
For example in the context of a location: It may mean that it is empty.
In the context of heat or cold it may mean that they have been dissolved, vanished and gone (and none existing).
In the context of fever: it means that it declines
In fact in a dictionary the meaning of the above verb is written as:
In the following I'll translate from Arabic language, as these are my own translations -if not otherwise stated or referred- take them with the necessary care
زالت الحياة
Life has gone or has been lifted
The crucial part in this verse is that Allah used the derived verb:
أمات amaata
which usually is translated as killed or bringing death other meanings may be to stall, to exhaust, to make an end (not necessary death, but something that may make you feel close to death) to something etc..
The closest meaning for the first time being lifeless here is being none existing or without the spirit of life (ar-Ruh/ar-Rooh الروح). This meaning would also solve the second time being lifeless as death means that our Rooh is lifted.
The meaning of "made us lifeless"
First always be aware that translation and interpretation go hand in hand often if not usually translations of the qur'an and sunnah somehow reflect a scholarly view that mostly should be agreed upon and not a literal meaning as you may have noticed from the linguistic dive above.
The point here is that this verse is clearly related and referring to:
How can you disbelieve in Allah when you were lifeless and He brought you to life; then He will cause you to die, then He will bring you [back] to life, and then to Him you will be returned. (2:28)
Ibn Kathir mentioned in the context of this verse the following:
Ibn Jarir reported from 'Ata' that Ibn 'Abbas said that,
وَكُنتُمْ أَمْوَتًا فَأَحْيَـكُمْ
(Seeing that you were dead and He gave you life) means, "You did not exist beforehand. You were nothing until Allah created you; He will bring death to you and then bring you back to life during Resurrection.'' Ibn `Abbas then said, "This is similar to Allah's statement;
قَالُواْ رَبَّنَآ أَمَتَّنَا اثْنَتَيْنِ وَأَحْيَيْتَنَا اثْنَتَيْنِ
(They will say: "Our Lord! You have made us to die twice and You have given us life twice.") (40:11)" (Tafssir ibn Kathir)
Ibn Kathir -see here in Arabic- also quoted a statement of ibn 'Abbas via a-Dahhak which goes in the same direction. He said that the same was narrated by ibn Mas'ood and others.
He further quoted some rather strange statements among them a statement of as-Sudi narrated by imam Sufyan a-Thawry saying that Allah give life in the grave and take it back. And another statement which ibn Jarir at-Tabari has quoted in his tafssir on the authority of 'Abdurrahman ibn Zayd ibn Aslam عبد الرحمن بن زيد بن أسلم:
خلقهم في ظهر آدم ثم أخذ عليهم الميثاق ، ثم أماتهم ثم خلقهم في الأرحام ، ثم أماتهم ، ثم أحياهم يوم القيام
He created them in the back of Aadam and toke the covenant, then caused them to die and then created them in the wombs, then cause them to die and then gave them back life in the day of resurrection.
So the best explanation is rather that we were created and given life from a state of none existence (first time being lifeless) until we got our ruh, then we lived in this life and died (the second time) and we will be resurrected in the hereafter for an eternal life.
Maybe Tafseer al-Jalalayn gives a clear and shor answer about this:
They will say, ‘Our Lord, You have caused us to die twice, two deaths, and You have given us life twice — for they were lifeless drops of semen, then they were given life, then made to die, then brought back to life for the Resurrection. We [now] confess our sins, in having disbelieved in the Resurrection. Is there then any way to go out?’, out of the Fire and return to the world to be obedient to our Lord? The answer given to them will be: No! (Tafssir al-Jalalayn)