Stopping a deceased character from following you
Solution 1:
If you are on PC, open the console and enter this command:
set playerfollowercount 0
This should fix this issue.
If you are on console, you must reload an earlier save.
Solution 2:
If playing on a platform that can use mods, using a mod like UFO - Ultimate Follower Overhaul (PC) or Amazing Follower Tweaks (PC) / Xbox One will allow you to have multiple followers, getting rid of the "you already have someone" message regardless if the deceased follower is still "following" you.