If your hero is alive you can rightclick items from your stash and drop it at your fountain.

If your hero is dead you cannot drop items from your stash directly. You will have to put the items in your courier and then you can drop it to ground via courier.

I don't see a reason why the option is only enabled when you are alive. I often drop items for my teammates when I am in a party.