i just had a loved one die, so im wondering what you would do if it happened to you or has happened
I am very sorry to hear that. I can give you the usual pep talk ("move on when you're ready, blah blah") but that won't do much to help.
Just remember that everybody dies, but not everybody gets remembered. The key to keeping your special person immortal is to remember them. When confronted with decisions, ask yourself "what would they do?"
Eventually your memory of them will influence your life in a very big way in the long-run. Then, the people that surround you will take what you have and use it in their lives. In the end, your loved one will never die because who they were as a person will live on in others forever.