The speaker is any supplicant or supplicants who sing this Psalm in a time of distress, not necessarily the author or the Psalm. The first person can also be construed as the collective Israel.
The handmaid is the collective Israel who are referred to as the maidservant of YHVH, as in Psalm 116:16. The term "maidservant" is used in these verses as more appropriate than "wife", and refer to the allegory of Israel being YHVH's bride or wife.
The intent of the expression "son of your handmaid" is to identify the supplicant as a descendant of the people who God's prophets said would receive His mercy and therefore himself worthy of mercy.
The expression בן אמתך, "son of your maidservant" is also an expression of humility, as the maidservant is in human society the lowest in the social order, the son is even lower. (RASHI)
Assuming that the person singing this Psalm views this Psalm as having been said by David, then the maidservant is David's great grandmother Ruth, who uses the same term for maidservant, אמתך, in Ruth 3:9 (NIV):
“Who are you?” he asked.
“I am your servant Ruth,” she said. “Spread the corner of your garment over me, since you are a guardian-redeemer of our family.”
The husband-wife allegory of God to Israel and the promise of mercy is developed in:
Jeremiah 2:2 (NIV):
Go and proclaim in the hearing of Jerusalem:
“This is what the Lord says:
“‘I remember the devotion of your youth,
how as a bride you loved me
and followed me through the wilderness,
through a land not sown.'"
Isaiah 54 (NIV):
- "Sing, O barren woman, you who never bore a child; burst into song, shout for joy, you who were never in labor; because more are the children of the desolate woman than of her who has a husband," says the LORD.
- "Enlarge the place of your tent, stretch your tent curtains wide, do not hold back; lengthen your cords, strengthen your stakes.
- For you will spread out to the right and to the left; your descendants will dispossess nations and settle in their desolate cities.
- "Do not be afraid; you will not suffer shame. Do not fear disgrace; you will not be humiliated. You will forget the shame of your youth and remember no more the reproach of your widowhood.
- For your Maker is your husband-- the LORD Almighty is his name-- the Holy One of Israel is your Redeemer; he is called the God of all the earth.
- The LORD will call you back as if you were a wife deserted and distressed in spirit-- a wife who married young, only to be rejected," says your God.
- "For a brief moment I abandoned you, but with deep compassion I will bring you back.
- In a surge of anger I hid my face from you for a moment, but with everlasting kindness I will have compassion on you," says the LORD your redeemer.
- "To me this is like the days of Noah, when I swore that the waters of Noah would never again cover the earth. So now I have sworn not to be angry with you, never to rebuke you again.
- Though the mountains be shaken and the hills be removed, yet my unfailing love for you will not be shaken nor my covenant of peace be removed," says the LORD, who has compassion on you.
Hosea 1-7:
Chapters 1-7 of Hosea are an allegory of the covenant between God and Israel from the marriage of Hosea to Gomer.
Song of Songs:
Most scholars see in this allegory the justification for the inclusion of the erotic Song of Songs in the canon.
There is no reference to "Messiah" in this verse because at the time that this verse was written there was no concept of messiah with a capital "M" in Judaism. That was a post destruction concept. At the time that this verse was written there was a priest who was anointed (messiah) and a king who was anointed (messiah).