One who is in tremendous pain but is not bedridden and does not feel weak throughout his entire body: 
Doing a Rabbinical prohibition with an irregularity: If one has not become bedridden [due to his illness] and as well is not suffering so much to the point that his entire body feels weak (but nevertheless is in tremendous pain) then it is allowed to do for him through a Jew any Rabbinical prohibition which will be done with an irregularity even if it is a forbidden action.
Doing a Rabbinical prohibition without an irregularity/Taking medicine: However it is forbidden for him to eat foods which are recognizable that they are being administered for medication, and certainly [to do] other Rabbinical prohibitions without an irregularity [is forbidden] even if they do not contain any resemblance of a Biblically forbidden action. As well [one may not] do a Biblical prohibition through a gentile being that doing so is a complete Rabbinical prohibition which is being done without any irregularity.
Having a gentile do a Rabbinical prohibition: It is permitted for one to do all Rabbinical prohibitions through a gentile even without [having the gentile do so with] an irregularity as was explained in chapter 307 [Halacha 12].
[Regarding giving assistance to a gentile which is giving the medical treatment-See Halacha 8]
Medication: Therefore [on the one hand] it is permitted to apply an external medical treatment through a gentile which places [the medicine] on him, since he [the Jew] is not doing any action in having this done. (However [on the other hand] it is forbidden for [the sick person] to eat foods that are recognizable that they are eaten as medication as will be explained). [As well any and all forms of recognizable medical treatment are forbidden to be applied by a Jew, as will be explained in Halacha 7 [See there], unless done using an irregularity.]
One who is in tremendous pain but is not bedridden and does not feel weak throughout his entire body:
Having a gentile do the treatment: Only a Rabbinical prohibition may be done. He may do so even regularly.
Having a Jew do the treatment: Only a Rabbinical prohibition done with an irregularity may be done.
Taking medicine: Is forbidden.
In cases that an action may only be done with an irregularity, what is defined to be an irregularity? 
One is to ask a Rav what is considered an irregularity for each particular forbidden action that he must do.
Is a Biblical action not done for its own use considered a Rabbinical action and allowed to be done by a Jewin cases that only a Rabbinical action is allowed to be done?
No. It is considered like a Biblical action being that it appears like one is doing an actual Biblical prohibition. [However to ask a gentile to do so in cases that only Rabbinical action may be done by a gentile is allowed according to those which hold that it is only considered a Rabbinical action.]