If God is omnipotent, then he can do everything which it is logically possible to do. This property implies that he can kill himself. Thus, if God can not commit suicide, then he is not omnipotent.
But, if God also exist necessarily, then he can neither fail to exist nor cease to exist; thus, he cannot destroy himself. God’s omnipotence would not require or permit that he could bring about his own non-existence if we assume his omnipotence requires only that he can do everything that is logically possible.
However, the notion of necessary existence is at least problematic. If God exists necessary, then there could be no possible world (= a world that can be described without contradiction) in which God did not exist. But it seems obvious that there can be such a world. We can imagine a world W in which only a single book exists. It’s hard to spot any contradiction in that world.
Since most philosophers deny that God’s existence is logically necessary, it seems that they must concede that God can destroy himself.
Everitt, N. (2004). The Non-Existence of God. New York: Routledge.
[Omnipotence] - [The Paradox of the Stone]