The first thing I would do is take him to a vet. If the cyst is benign then it may be able to drain it with little trouble or expense. I think dogs will instinctively know when fasting is best for them and they will stop eating of their own accord and inner wisdom. I'm not sure its humane to impose a forced fast on an animal. Do try and keep him on a healthy Diet
though, my fourteen year old muttdawg acts like she's mistreated since she no longer gets people junk food, but I know its best for her.