There is a halacha that is recorded twice in Y.D., once at the end of hilchos sheratzim and once in siman 155 in the Rama - מותר לשרוף שרץ או שאר דבר איסור ולאכלו לרפואה אפילו חולה שאין בו סכנה. The obvious implication is that for the sake for refuah it is permissible to eat a prohibited item that has become inedible, but when it is not being done for refuah purposes, it is forbidden. The Yad Avrohom explains based on the Rosh (2nd Perek of Pesachim) that when one burns chometz before pesach rendering it unfit for consumption, it would still be forbidden to eat on Pesach since by eating it he is giving it importance - מדאכליה אחשביה. Based on this it would be forbidden under normal circumstances to eat a bug or other forbidden item that has been burned, but if it is merely being eaten for medicinal purposes it is permitted since the concept of אחשביה only applies when one is consuming it as a food item. This is to the exclusion of the Sha'agas Aryeh (75) who considers the concept of אחשביה to apply even when one is eating something for medicinal purposes. Either way, the concept of אחשביה is a Rabbinic concept. On a Torah level it would seem impossible for one's intent or purpose to determine an item forbidden or permitted.
However, according to R. Yehuda in the mishna, when one gathers the small pieces of meat that are attached to the inner side of the hide together to make a kezayis, it would have status of a kezyais neveila. Rav Huna explains that this is only when he himself gathers them together, indicating through his actions that he is considering it to be important - דאחשביה וגלי דעתיה דלא בטליה מעיקרא: רש"י. Rashi writes that the concept of אחשביה can be used here, not only in the realm of טומאת נבילה, but even in the realm of איסור נבילה. Meaning, his intent to consider the scraps to be meat restores their status even in the world of issur. Tosafos asks on Rashi, where do we ever find that intent could be the determining factor as to whether a food item is permitted or prohibited!? This would seem to be a machlokes between Rashi and Tosafos whether the concept of אחשביה can even work on a d'oraysa level in the realm of issur v'heter.
The gemara on 120a said that חלב -animal fat that had been liquefied should not be included in the prohibition of eating חלב since it would be drinking and not eating, and we need a special source in the Torah to include it. However, the gemara says that blood which the torah forbids as an issur to eat in it's natural state (as a liquid) would also be forbidden if it were congealed - כיון דאקפיה אחשובה אחשביה - since he gave it status through the act of congealing it. This gemara seems to support Rashi, because we are using the concept of אחשביה to maintain the issur of consuming blood even when it is in solid form. But, upon further analysis, we can ask a more basic question. Why does the gemara require this rationale and not simply state that if liquid blood qualifies as eating, then certainly solid blood would qualify? It seems to me that the gemara is bothered by another issue. Since blood is naturally in a liquid state, consuming it in it's solid state could be considered שלא כדרך אכילה - not the normal way of eating. The gemara is saying that since he congeals it for the purpose of eating it as a solid, it is still considered a normal way of eating. We aren't using this rationale to transform the status of the blood from issur to heter, only to say that it still qualifies as a normal way of eating.