How do Biblical Unitarians contextually explain Thomas' exclamation at John 20:28? John 20:28 has Thomas saying

&quot;My Lord and my God!&quot;

For Trinitarians, this line is fairly straightforward - Thomas is recognizing that Jesus is not just Lord but also God.
How do Biblical Unitarians understand this line, in particular in terms of how context can inform our reading of this line?
Thomas’ exclamation at John 20:28 “My Lord and my God!” is the culmination of a major theme in the Gospel of John. Initially, I viewed this as problematic from a unitarian perspective, something of a question mark – now I view it as central to understanding John’s message correctly. Instead of detracting from a unitarian interpretation of John, it buttresses it, once understood in the larger context of John’s Gospel and in particular John 14, which is the previous time Jesus speaks with Thomas in John’s Gospel.
This answer won’t focus on the grammar of the phrase, but a few notes on grammar are in order. The phrase itself could refer to one thing or two things – it is ambiguous. It would unambiguously refer to one thing if it were “My Lord and God.” If John had wanted to unambiguously apply both epithets to Jesus, he could have done so that way (as in John 20:17 – “the Father of you and Father of me”). But neither of these considerations are decisive. One response to this ambiguity is to point to how Thomas’ exclamation is said ‘to him’, i.e., to Jesus, so one could argue that both ought to apply to Jesus as they are both directed towards Jesus. Although this isn’t conclusive either, it is a good point – the comments are indeed directed towards Jesus and so logically it seems they should apply towards him. In this I am in agreement with some Trinitarians, but it doesn’t work out the way many Trinitarians think it does. More on this later.
Option 1.
Thomas is saying Jesus is Thomas’ Lord and Thomas’ God. This is the standard Trinitarian interpretation, and perhaps the most common interpretation of the phrase nowadays. If you think Jesus is claiming to be God in the Gospel of John, this makes sense as a culmination of that theme, this time going from one extreme of doubt to the other of conviction not just that Jesus is alive, or the Christ and the Son of God, but God himself – although of course Thomas wouldn’t have the Trinitarian language to express this more precisely as “God the Son.”
This is problematic, however, when you start to note how many times Jesus is distinguished from God in the Gospel of John. John 8:40 says it very clearly.

“a man, sent by God”

The examples here could be multiplied many times, but a few more will suffice here to drive home the point.
John 5

“I do nothing of my own”

Could God really do nothing on his own? Much of John 5 which features an extended response by Jesus clarifying his relationship with the Father, shows a clear asymmetry between the Son and the Father – the Son is the representative, messenger, and has been delegated authority. These all point towards the Son not claiming to be God, but rather (logically enough!) the Son of God and the Messiah. ‘The Son of God’ was simply a term in common use at the time to single out the Messiah, and is routinely coupled with it (ex., Nathanael in John 1, Peter at Matthew 16:16, and Caiaphas at Matthew 26:63, Mark 14:61). The Gospels clarify that this term ‘the Son of God’ is given by God because Mary will conceive by the power of the Holy Spirit (“And now, you will conceive in your womb and bear a son, and you will name him Jesus. He will be great, and will be called the Son of the Most High, and the Lord God will give to him the throne of his ancestor David [i.e., be King]. He will reign over the house of Jacob forever, and of his kingdom there will be no end.” Mary said to the angel, “How can this be, since I am a virgin?” The angel said to her, “The Holy Spirit will come upon you, and the power of the Most High will overshadow you; therefore the child to be born will be holy; he will be called Son of God.”” Luke 1:31-35).
Similarly, Jesus distinguishes between himself and God at John 17:3

“And this is eternal life. That they may know you, the only true God,
and Jesus Christ whom you have sent.”

where the context makes clear that the ‘you’ is the Father.
Similarly, John 20:31, just after Thomas’ exclamation, gives John’s summary of the most important points from his Gospel.

“But these [i.e., signs] are written so that you may come to believe
that Jesus is the Messiah, the Son of God, and that through believing
you may have life in his name.”

What are the important points? That Jesus is the Messiah and the Son of God. (Note the pairing again – these are closely related in the minds of ancient Jews, as they are in Psalm 2.) No mention of Jesus being God. This is strange, if indeed Thomas’ exclamation was intended to convey that Jesus is not just the Messiah and the Son of God, but God himself.
Obviously, Option 1. is not compatible with Biblical Unitarianism, but is included here to contrast the options that follow. The rest, however, are.
Option 2.
Thomas is expressing surprise. The expression is perhaps similar to saying “Oh my God!” This sounds natural to contemporary English speaking ears, who hear those sorts of mild oaths all the time – but it becomes problematic when transposed to ancient Jewish society, where carelessly uttering God’s name would almost certainly be frowned upon – if not viewed as blasphemous or a violation of a commandment (“Thou shalt not take the Lord your God’s name in vain”). Furthermore, Thomas is making his exclamation to Jesus (“Thomas said to him”), whereas an expression of surprise is generally not most naturally understood as being said to someone.
Option 3.
Thomas is simply mistaken. He thinks Jesus is God, but he’s wrong. You can point to various people being wrong in the Gospel of John as precedent here, including Thomas (John 14). Indeed, a major theme in the Gospel of John is that people are confused about what Jesus is saying and who he is. However, this seems odd coming a) near the very end of John’s Gospel, and b) without correction from Jesus. You might think that the Gospel writer would clarify this error if it were indeed an error of Thomas’. Instead, Jesus seems to approve of Thomas’ exclamation, chiding him only for taking so long to believe.
Option 4.
Thomas called Jesus a ‘god’, not ‘God’. So the phrase would be translated “My Lord and my god,” or more literally “The Lord of me and the god of me.” (With many passages referring to God or a god, context is required in the Greek to know which is which. Ancient Greek did not make a distinction in capitalization.) The commentary to the Revised English Version (a Biblical Unitarian translation) explores Option 4. at length here (and also discusses Option 5. in brief).
This idea of Thomas saying ‘god’ here has the precedent of Jesus himself referring to the gods of Psalm 82 and comparing himself to them in John 10, and has Old Testament precedent in the application of ‘god’ to Moses (Ex.) and judges (Psalm 82), among other things, and it would represent a development of Thomas’ views concerning Jesus and so make sense as a development of a theme within John’s Gospel re Jesus’ identity. However, it is not clear how likely Thomas – an observant monotheistic Jew – would be to use the word ‘god’ to describe Jesus – even with Jesus’ own comparison and Old Testament verses. Also, John does not then go on to note Jesus is a god in his summary at John 20:31, unless you take the Christ and the Son of God to be equivalent to calling Jesus a god. So this shares a problem with Option 1.
This perhaps would be the best option for a Biblical Unitarian – if not for Option 5.
Option 5.
This is the option I will present at length here. As Biblical Unitarian Anthony Buzzard summarizes it in his commentary on John 20:28 (The One God, the Father, One Man Messiah Translation: New Testament with Commentary, footnote 741)

“Finally seeing what he had earlier in ch. 14 missed, that in seeing
Jesus you see God the Father in action and word. This of course does
not mean that Jesus is the Father! No son is his own father! Thomas
certainly did not think that the creed of Israel and Jesus (Mk. 12:29)
was suddenly destroyed! John 17:3 defines the Father as “the only one
who is true GOD.” John wrote his whole book to prove that Jesus is the
Messiah (20:31).”

Buzzard summarizes it well, but a more detailed analysis is in order. (Also see Brother Kel’s commentary here, which has inspired some of the work below.)
The immediate context of Thomas’ exclamation is seeing and more generally having first-hand sensory evidence for the resurrected Jesus, and believing that Jesus is alive. At John 20:18,

“Mary Magdalene went and announced to the disciples, “I have seen the
Lord”[.]”

Then the disciples at John 20:25 similarly.

“So the other disciples told [Thomas], “We have seen the Lord.” But he
said to them, “Unless I see the mark of the nails in his hands, and
put my finger in the mark of the nails and my hand in his side, I will
not believe.”

Believe what? The immediate issue is belief in whether Jesus has resurrected, i.e., is alive. Thomas seems to think the other disciples saw a ghost or perhaps someone else, despite their testimonies (cf. Luke 24:36-43 “While they were talking about this, Jesus himself stood among them and said to them, “Peace be with you.” They were startled and terrified, and thought that they were seeing a ghost. He said to them “Why are you frightened, and why do doubts arise in your hearts? Look at my hands and my feet; see that it is I myself. Touch me and see; for a ghost does not have flesh and bones as you see that I have.”).
After appearing to the disciples again, John 20:27 specifically addresses Thomas who wasn’t there the first time.

“Then [Jesus] said to Thomas, “Put your finger here and see my hands.
Reach out your hand and put it in my side. Do not doubt but believe.”

Seeing Jesus’ wounds and touching them will put to rest any idea that Jesus is a ghost or someone else.
Then Thomas 20:28-29

“Thomas answered him, “My Lord and my God!” Jesus said to him, “Have
you believed because you have seen me? Blessed are those who have not
seen and yet have come to believe.”

Again, believe what? The immediate issue is that Jesus resurrected. But is this the extent of belief involved? After all, Lazarus was resurrected, as was Jairus’ daughter. Why was Jesus’ still being alive so important? The answer is given in the next two lines, John 20:30-31.

“Now Jesus did many other signs in the presence of his disciples,
which are not written in this book. But these [i.e., signs] are
written so that you may come to believe that Jesus is the Messiah, the
Son of God, and that through believing you may have life in his name.”

Jesus’ resurrection is the ultimate sign that he is, indeed, the Messiah (compare “no sign will be given to [this generation] except the sign of the prophet Jonah,” i.e., Jesus’ resurrection, Matthew 12:38-41). The whole purpose of John’s Gospel is not to demonstrate that Jesus is God, but that Jesus is (contrary to what many people at the time were saying) the Messiah.
But why does Thomas say “My Lord and my God!”, seemingly going beyond Jesus being the Messiah and the Son of God and calling Jesus instead God Himself?
Having established what the immediate context is about (that Jesus is alive, therefore has resurrected, therefore is the Messiah and the Son of God), we can now move to the larger context of this exchange in John, which gives us the straightforward reason. The larger most relevant context is John 14, which is also the same part of John where Thomas previously speaks to Jesus. Indeed, John 20:28 is a development of John 14. The greatest and final sign of Jesus’ Messiahship is that he has resurrected as he said he would. John 14:18-20

“I will not leave you orphaned; I am coming to you. In a little while
the world will no longer see me, but you will see me; because I live,
you also will live. On that day you will know that I am in my Father,
and you in me, and I in you.”

‘On that day’. Which day? The day the disciples see him, because he is still alive despite being crucified. What will happen ‘on that day’? The disciples will know that Jesus is in his Father.
John 14:20 here also nicely clarifies the idea that Jesus is in the Father and the Father in Jesus. Similarly, the disciples are in Jesus and Jesus in them. Just as Jesus’ co-inherence with God does not make Jesus God, the disciples’ co-inherence with Jesus does not make them Jesus.
Now let’s move a bit further back in John 14 to Thomas’ interaction with Jesus, John 14:5-7.

“Thomas said to [Jesus], “Lord, we do not know where you are going.
How can we know the way?” Jesus said to him, “I am the way [to the
Father], and the truth, and the life. No one comes to the Father
except through me. If you know me, you will know my Father also. From
now on you do know him and have seen him.”

Then Philip picks up the exchange (John 14:8-10).

“Philip said to him, “Lord, show us the Father, and we will be
satisfied.” Jesus said to him, “Have I been with you all this time,
Philip, and you still do not know me? Whoever has seen me has seen the
Father. How can you say ‘Show us the Father’? Do you not believe that
I am in the Father and the Father is in me?”

Whoever has seen Jesus has seen the Father. After resurrection, Thomas sees Jesus and exclaims “My Lord and my God!” Thomas is stating his belief in what Jesus is saying here at John 14. Thomas has seen Jesus, and therefore has seen the Father, i.e., God.
That Jesus understands just the Father to be God is made clear repeatedly throughout John, perhaps most straightforwardly at John 17:3 which was quoted in assessing Option 1. above, “And this is eternal life. That they may know you [i.e., the Father], the only true God, and Jesus Christ whom you have sent.”
Why is seeing Jesus seeing God? Because Jesus is the Messiah, as John makes clear in his statement of the purpose of his Gospel at John 20:31 – the messenger, representative, and one with delegated authority from God, who co-inheres with God (as the disciples will co-inhere with Jesus) and therefore says what God tells him to say and does what God tells him to do. Co-inherence is about a deep and abiding spiritual connection with God or Jesus, not identity.
Much more can be said about passages from John which inform Thomas’ exclamation, but the basic point is that John 20:28 must be read in context. The context strongly points toward Jesus claiming to be the Messiah and the Son of God, not God. The character development of Thomas, from John 14 to John 20, gives us the key to understanding Thomas’ exclamation. Now he sees Jesus’ true identity for the first time, and therefore sees his Lord, i.e., Jesus, and his God, i.e., the Father, because he now knows that Jesus co-inheres with the Father and is, indeed, the Messiah and the Son of God who does and says what the Father, i.e., God wants him to do or say.