Not that I condone suicide, which I normally do not except in extenuating circumstances, such as terminal illness and so on and so forth, but I will say this in regards to ending your existence. If there is indeed an afterlife (current evidence weighs heavily against this, mind you), then you would simply wake in a new plane of existence with the exact same problem you have now, which means not much has really changed.
However, if this is indeed the only time in which your consciousness has existence and there isn't an afterlife (which is current evidence shows support), then yes, you would merely have to terminate your brain either directly or indirectly, since that is the origin of your consciousness, and therefore the origin of you.
Keep in mind that whatever is triggering this desire for nonexistence may simply be the result of poor chemistry in the brain and should be addressed first. If you can make the desire for nonexistence go away, then that would be a path with much more promise than nonexistence. Current evidence supports the notion that you only exist once and will not be expected to make a reappearance ever again. Be a shame to waste the opportunity you have to enjoy life.