Is there a way to kill yourself immediately in Minecraft? Without using normal methods like dropping sand or gravel on top of yourself or letting mobs attack you without fighting back, something like the kill command in Quake-like games?

I'd like to add to this. As of the last pre-release, 12w16, you can enable "Cheat Mode" within the World Settings, then in game use the /kill method, as described below.
–
0-frame linksApr 25 '12 at 4:16

Just stack about 25 blocks underneath you by jumping & placing a block underneath you (at the height of your jump). After your stack is built sufficiently high, simply step off the edge to your death. This stack can be made of dirt, sand, or any block which you have an excess of at the moment.

Once you work out how many blocks you have to stack before the fall will kill you, it will only be a sub-second fall before you're dead. Also, the stack itself should only take about 10 seconds to build.