Gods
The Lord is called "Jehovah" in the Bible when the text is referring to his essence, which is love itself. He is called "God" when the text is referring to the expression of that love -- which is called Divine Truth. References to other gods, both positive and negative, reflect that meaning. In positive cases -- such as when angels and people are called gods, or when the Lord is referred to as the God of gods -- those gods represent true ideas that come to us from the Lord. In negative cases -- such as when the people of Israel repeatedly adopt the gods of their neighbors -- those gods represent false and twisted thinking that attacks what is good and true.
Arcana Coelestia # 8607
8607. 'Amalek prevailed' means that the falsity would then be winning. This is clear from the meaning of 'prevailing' as winning; and from the representation of 'Amalek' as falsity arising from interior evil, dealt with in 8593. Israel's winning at one time, Amalek's at another, represented the experience of those who belong to the spiritual Church. They cannot have a faith which looks constantly to the Lord, only a faith which by turns looks to self and the world. For the light among members of that Church is dim, as a consequence of which their faith is impaired. For the fact that they are like this, see 2708, 2715, 2718, 2831, 2935, 2937, 3833, 6289, 6500, 6639, 6865, 6945, 7233. This explains why Amalek was not annihilated by Joshua, or subsequently by the judges, or by the kings in the land of Canaan, even though it had been commanded that he should be wiped out, 8593.