One who regrets or is ill may be said to feel bad, but unless he has suffered a loss of tactile sensitivity, he likely does not feel badly.
The relevant distinction is between the modification of a verb and the linking function that it sometimes performs. Verbs, of course, are modified by adverbs, not adjectives. On the other hand, certain verbs, known as copulas, link their subjects to predicate adjectives or nominatives, which thus modify or are identified with the subjects rather than the verbs. For example, in the clause he became slow slowly, the adjective slow and the adverb slowly modify the subject he and the copulative verb became, respectively.
The verb to feel is particularly confusing because it assumes several distinct grammatical roles corresponding to various usages, which differ only slightly in meaning. When it means to perceive through tactile sensation, or otherwise be aware of, it is a transitive verb, as in to feel pain. But when it means to hold as an opinion, it becomes intransitive, though still commonly modified by an adverb, as in to feel strongly. Finally, when it means to regard oneself as, or to have the sensation of being, it is a copulative verb, naturally followed by an adjective, as in to feel strong. Those who erroneously claim to feel badly may respond to the observation that their intended meaning is closest to the last of these senses.
When feel badly is misused in reference to one's health, it may be seen as a case of hypercorrection, propelled by a faulty analogy with feel well, which is idiomatically preferred to feel good in this context. Since well is (sometimes) the adverbial form of good, an analogous preference of badly to bad may seem natural to the careless observer. The fallacy, of course, is that well is in this case an adjective rather than an adverb, and is preferred on grounds of precision rather than grammar.
Perhaps the most convincing way to expose this error is to examine the grammatical character of a modifier that more accurately conveys the intended meaning. No native speaker would be tempted to say feel regretfully when he means regretful, or similarly to replace adjective with adverb in feel sick (although the adjective sickly is an acceptable alternative), feel sad, or feel evil, but when bad is carelessly used as a generic substitute, the transition to badly seems to be relatively painless.