Overview
Psalms 138:1, David praises God for the truth of his word; Psalms 138:4, He prophesies that the kings of the earth shall praise God; Psalms 138:7, He professes his confidence in God.
Five manuscripts omit ledawid ; and the LXX and Arabic prefix also the names of Haggai and Zechariah; and it is probable that it was composed to be sung at the dedication of the second temple.

I will praise: Psalms 9:1, Psalms 86:12, Psalms 86:13, Psalms 103:1, Psalms 103:2, Psalms 111:1, 1 Corinthians 14:15, Ephesians 5:19
with my whole: The versions and several manuscripts add Jehovah.
before: Psalms 82:1, Psalms 82:6, Psalms 119:46, Exodus 22:28, John 10:34-36, Acts 23:5, Hebrews 1:14
the gods: Or, God, Elohim
Reciprocal: 1 Chronicles 29:10 - David blessed 2 Chronicles 6:4 - who hath with Psalms 57:9 - General Psalms 108:1 - I will Psalms 109:30 - I will praise Colossians 2:18 - intruding Colossians 3:16 - singing

All the kings: Psalms 72:11, Psalms 102:15, Psalms 102:22, Isaiah 49:23, Isaiah 60:3-5, Isaiah 60:16, Revelation 11:15, Revelation 21:24
when they hear: Psalms 22:22, Psalms 22:27, Psalms 51:13, Psalms 69:30-32, Psalms 71:18
Reciprocal: Judges 5:3 - O ye kings 2 Chronicles 6:33 - that all people Psalms 18:49 - will I give thanks Psalms 35:18 - praise Psalms 57:9 - General Psalms 67:4 - O let Psalms 108:3 - praise Psalms 109:30 - I will praise Psalms 148:11 - Kings Isaiah 62:2 - all kings Jeremiah 31:7 - Sing Zephaniah 2:11 - and men Zechariah 8:20 - there Romans 15:10 - General