I am very sorry to hear about Peanut's vomiting after being fed a White Castle cheeseburger.
Vomiting/retching can be from several causes. Common ones are a quick change in diet, too many treats, especially fatty or spicy treats, eatings things they should not such as things found in the yard, toy pieces or garbage, viral or bacterial or parasitic infections.
More serious causes of vomiting include chronic pancreatitis, a dietary allergy or sensitivity, inflammatory bowel disease, internal organ failure (kidney or liver disease), a full or partial gastrointestinal obstruction or even infiltrative cancers such as lymphoma.
In your pup's case his vomiting could very likely be caused by eating a high fat, unusual food (the cheeseburger). But given his other health issues he needs to be closely watched. Dogs with heart disease that is not being well managed can end up with gastrointestinal upset.
At this point we can try some things at home but he may need to see a veterinarian if he isn't coming along well.
Kaomycin is an antibiotic that works topically on the gut, it is much better for diarrhea than nausea.
To try and settle his stomach now you can give either:
1) Pepcid-ac (famotidine) at a dose of one half of a 10mg tablet per 10 to 20 pounds of body weight every 12 hours.
2) Prilosec (omeprazole) at a dose of one quarter of a 20mg tablet per 10 to 20 pounds of body weight every 24 hours.
These will reduce stomach acid and should help if this is related to simple nausea and gastrointestinal irritation from eating something he should not have. They can be used for several days if need be.
I would not feed him any food for 12-24 hours even after the acid reducers are started.
This should help stop gut spasms and restore normal gut motility.
Starting a couple hours after the acid reducers small amounts of water or ice cubes given frequently are fine as he needs fluids after all that he has lost with vomiting.
You can give him pedialyte to replace electrolytes too but Gatorade is much too high in sugar which can make his gastrointestinal irritation worse.
If things are going well after his food fast and the acid reducers start a bland diet of 1/3 boiled hamburger (or boiled, white, skinless chicken), all fats drained off the meat, mixed with 2/3 boiled, plain white rice or very well cooked pasta. Feed several small meals a day. Once he feels better (no vomiting for 48 to 72 hours) start mixing in his regular dog food very slowly. Less bland more regular with each day. It should take a week or so to convert him back.
If Peanut is continuing to vomit and is feeling poorly though, it would be best that he see a veterinarian now as anything you give him orally will just come back up worsening his dehydration.
If he has a tense painful abdomen, becomes very lethargic, begins vomiting again or runs a fever greater than 103.5F then he really must be seen by a veterinarian as soon as possible.
Best of luck with your little one, please let me know should you have any further questions.