Your grave marker can only be set up on a spot where you die, so naturally you must kill yourself to set up your marker. There are only a few ways to die in a bank that I'm aware of.
1) Become poisoned and then wait for the poison to kill you in a bank. 2) Drop a vial of nitroglycerin (obtained during digsite quest), causing either 25 or 35 damage. 3) Have someone attack you outside of a bank in a PvP world, and then run into the bank and die within the 10 seconds that they can still attack you.