These words could mean either 1) the author was calling from the bottom of a literal pit into which he had been thrown. Alternate translation: "I called ... from the bottom of the pit" Or 2) the author was afraid he was about to die and he spoke of death as a pit out of which he could not climb. Alternate translation: "from the pit of the dead" (See: [[rc://en/ta/man/translate/figs-metaphor]])
God's name represents his character, and here, "called on your name" represents trusting God's character and calling on him for help. Alternate translation: "I called to you for help" (See: [[rc://en/ta/man/translate/figs-metonymy]])