On death you'll drop your main bag (default "B" keyboard shortcut) but keep both your gathering bag ("G" keyboard shortcut) and anything you've got in your consumables pouch (above your skill bar). If I'm not mistaken, you keep anything you see under the "i" keyboard shortcut, but I believe your equipped items may take a damage hit (someone correct me if I'm wrong, there).
Once your main bag is dropped, you cannot pick-up or craft anything that would normally go into your main bag. If you recover your main bag you'll regain the ability to pick up new items and craft items that go into your main bag...as long as you have available slots, of course. If you cannot retrieve your main bag, there is a way to forfeit that bag, losing all items within, and get a new, empty bag.
I'll add that I think this mechanic is a little confusing and overly punishing. With different bags holding different types of crafting items, and the fact that the bags are actual bags and not just a menu to slide through, I do find it quite awkward to manage and explain - even if it's not outlandish.
I'd love it if there was a way to reconsider what can be done with bags/storage/death.
I do like that bags can be upgraded and I hope these upgrades are craft-able in the future, including chests/bank storage of some sort!
At the expense of repeating myself, I'd love to keep my bag on death and substitute it for an XP penalty. I loath corpse runs; it's the main reason I don't play full-loot PvP/PvE games. The mechanic in this game hasn't yet turned me away, but it walks the line. I can see situations where it could walk over that line (as others have mentioned), where loot is lost and neigh unrecoverable in a challenging dungeon - causing some to have an existential crisis.