In general, most inventories reset, even for normal characters. Most guards seem to respawn even if you they don't die, so I'd say that it's possible that the item deposited will disappear. I've had guards switch around sexes and voice actors, so it might happen if the character as a whole resets. At the same time, I've had a dead guard in Windhelm for over a year, and three female guards still remain in Winterhold, so I think some places, they don't really respawn as much. Be wary if the item you're giving is very important.