Always separate a direct address (even an insult) from the rest of the sentence with a comma (or commas, if the direct address falls in the middle somewhere).
I generally prefer not to use semicolons in dialogue, but you could use a semicolon rather than a period after idiot; just don’t capitalize act if you choose that punctuation.
“You are holding a loaded gun, you idiot. Act like it.”
I’d change You are to You’re, because this seems like a fairly informal bit of dialogue.