Don't tell them that you're looking for a new job.
Tell them the reasons why you feel the need to look.
Tell them what you're unhappy with, what could be better and what you would really like to see change.
Set up a meeting specifically about this or put it in writing. Make sure that they can't ignore that you're unhappy with the status quo.
This makes the discussion about the things that might actually keep you, and avoids getting into ultimatums (which you never want to make in work) or battles of egos. You want to give them a way to 'win' without losing face.
Then if they don't fix what you asked them to then when you find a new job you're not "leaving them in the lurch" because you already told them what they needed to do better.
Note that all that's assuming that they could make changes that will keep you. If you're emigrating or something (though many companies could cope with very remote workers better than they realise) then just tell them and offer to help succession planning - most replacements take significantly longer to find and train than most notice periods.