How can I estimate the percentage of electricity (bill) is due to heating and cooling?
Your method works to a first approximation. One big assumption is that you had no (or little) costs to heat and cool during that smallest-bill month of May. The other big assumption is that all of your other loads during that month of May are representative of the loads the rest of the year. If both of those are true, then your method should be quite accurate. 

One fairly obvious difference is in your water heater. As the temperature warms up, the temperature of your incoming water supply warms, too, meaning you need less energy to heat the water to the desired temperature. And, as the temperature drops, you need more energy to heat the water. It's kind of the opposite of your AC.

One other thing to consider is not cost, but actual energy usage. $143 in May be more energy usage than $143 in August, depending on your utility rates. It might even be that your rate differs during the day, or with usage. To be sure, check how much energy you actually used, in kWh, and compare those values from May to the rest of the year.

There are various estimates out there for what uses the most electricity, but HVAC always tops the list at 30-50%. Water heater is usually next, followed by laundry (dryers mostly). Unless you've done something specifically to reduce your usage, yours probably follows a similar profile and would be a good cross check of your estimate.

If you want a more accurate assessment, your local utility may be able to provide an energy audit. You can also look into installing a whole-home energy monitor, such as Sense (not a recommendation, just an example), though I'm not sure how accurate those are. If you have a smart electric meter, you may be able to glean higher-resolution usage data for your whole home (mine reports usage every 15 minutes), rather than the monthly usage reported on your bill. This might be easier to correlate with days you know the HVAC was not running. You could also install smart thermostats, some of which can report minute-by-minute usage.