Given that it's preferable to have an empty mouth when saying a bracha must I remove chewing gum from my mouth before saying a bracha - for example, for a glass of water, or anything else for that matter - and if so does it make a difference if taking it out would mean I wouldn't want to continue chewing it after (which would result in wasting food)?
Orach Chaim 172:2 - you should remove the candy from your mouth and make a Bracha. If it is chewed and unappetizing to remove, you may push it to the side of your mouth and make a Bracha.
Your mouth should be empty when saying a bracha: We learn this from the passuk: (Tehillim 71:8) Let my mouth be filled with Your praise ימלא פי תהילתך The emphasis is on our mouths not having something else inside, so that they are only filled with G-d's praise and nothing else - it would seem to me irrelevant whether it was food or something else.
(I can't find the source for this, but if I remember correctly, it is in connection with someone who forgot to make a bracha and that he needs to take the food out of his mouth before making the bracha.)