I was thinking about it lately.
If God can do everything, can He destroy Himself?
Is there something about this possibility in any of the holy books?
This kind of question is addressed by Maimonides in his Guide for the Perplexed (3:15), in which he states that we cannot ascribe to God the ability to do that which is impossible, thus, "it is impossible that God should produce a being like Himself, or annihilate, corporify, or change Himself. The power of God is not assumed to extend to any of these impossibilities."
It is important to understand that this does not actually entail any limitation on the power of God (as Maimonides states later). This is because the real issue here is that the questions are fundamentally nonsense. God cannot destroy - or duplicate - Himself any more than He can create a triangle with four corners. The only way we can ask either question is if we fail to understand the meanings of the words we are using.
I believe that this question is based on a premise that illustrates a shallow understanding of what G-d is. The question assumes that the rules of logic are somehow inherently there, and G-d is bound by them. If that would be the case, if we would say that G-d is unlimited then He would be bound to being unlimited, and could not also be limited - because logically something which is unlimited cannot also be limited. Another form that this question often takes is the famous "Can G-d create a rock so heavy that He can't pick up".
In fact, not only did G-d create the world, but he created logic too. He is therefore not bound by the constraint of logic. Yes, logically it is not possible to pick up something that is too heavy to pick up - but G-d was the one who made the rock, the concept of heaviness and the rule that something that is too heavy cannot be lifted. So the answer is yes, He could create such a rock, and He could pick it up too. Another example: G-d created a world in which one plus one equals two - He could just as possibly have made a world were one plus one is three.
The is famously expressed in a Kabbalistic work called "Avodas Hakodesh" (Section I, ch. 8):
In other words, since G-d is the ultimate perfection, there is no advantage that He lacks. In logical terms, two opposite advantages can be mutually exclusive (How can something be limited and unlimited at the same time), but for G-d that is not a constraint.
So to answer your question: Can G-d destroy Himself? G-d possesses any advantage that there might be in being able to self-destroy, but at the same time this does not contradict with His ability to exist forever.
If the siddur qualifies as a "holy book", then in אדון עולם it says that Hashem is בלי ראשית בלי תכלית which I would translate as "without beginning, without end".
Chief Rabbi Sacks says in his commentary on siddur that "the siddur is our tutorial in belief".
Following Derfder's comment below:
The Ramchal starts Derekh Hashem as follows:
Easy answer: no.
Where does it say "G-d can do anything?"
Go back to Maimonides' 13 principles of faith:
"... that He is the creator and director of everything created, and He alone has done, currently does, and will do all that is done."
"All that is done" does not include theoretical paradoxes!
(Yes I realize there's a place in the High Holiday liturgy where G-d is referred to as hakol yachol, "all-capable", but that's the nutshell version. You want the nitty-gritty, go back to Maimonides' formulation.)
Let's take it further: we also believe that G-d is absolutely one, and that G-d is non-physical. "Can G-d make Himself physical? Can G-d cut Himself into two?" The answer to all these questions is no.
If it makes you feel better, Rabbi Yosef Gavriel Bechhofer has a fascinating syllabus for lectures on the Thirteen Principles, which does include a bullet point on "can G-d create a rock too heavy for Him to lift?"
I'd like to offer a more philosophical/logical answer, but essentially I'm only providing you with hopefully more simple means of understanding the reasoning behind other answers appearing here.
Please allow me to tackle the title question:
The particular issue with this question is that by asking it you are ascribing (or assuming) a men-like, natural qualities to God - thus, given you believe in a supernatural God, the question itself is nonsense. Let me explain:
From here there are two options:
Regardless of which one you pick, both derive at the same conclusion: God doesn't exist in time. And if so, cause and effect are not part of his existence. And so asking if God can destroy himself (cause) and thus cease to exist (effect) is complete nonsense.
Removing time, cause and effect from the Godly realm also solves the question: who created God? For if there's no time, God always existed.
Even if God could destroy himself, in an existence not based on cause and effect he could 'undo' his own destruction or carry on existing despite destroying himself. The same logic that applies to us does not apply to God - in his existence everything is possible, even having no limits and all the limits. This is pretty much what God is about.
Now allow me to seal this off with a question. Is this a nonsense question:
Please note that I'm not asking if God created the world, I'm asking if asking the question is a valid thing to do.
one thing that I wish to acknowledge that I hope won't cause a stir, I am Christian, but I like to expand my knowledge when possible.
from what I know, God Created all things, which would mean that he could destroy all things. but I have never seen anywhere that God Created himself.
Malachi 3:6 "For I am the LORD, I do not change..." (NKJ)
I found this Quote on a website called Judaism in a Nutshell (First Paragraph of Point 1, last 2 sentences)