If it a life saving attempt. Then you would have no choice. The thing is it is not the taste of the bugs that you should be worried about. You eat medicine and that too is very distasteful at times. But the time is 'whether your digestive system is able to digestive it properly'. Because even if the bug is poisonous and your stomach can digest it. Don't worry at all. Because it is not, in that case, poisonous for us. May be for some other animal, but not for our body.
And the second thing is. Even is you want to eat bugs. Try to cook them on bare fire. It will kill most of the bacteria. And those bacteria which are not killed, their growth will be retarded. So it will not be that much harmful.
These are the only two scientific answers I could share.