My wife has an illness that has effectively killed her desire for intercourse. I'm certainly not going to force her to do something that does not feel right for her. However, I am at my wit's end. I still have desires for intercourse and I don't have any outlets right now for it except for self-stimulation, which makes me feel dirty and guilty.
Please, I need some advice here on what to do. Thank you very much.
It appears you know what needs to be done; it is accepting the fact that is difficult. It is easy to do what is right, such as being faithful to your spouse, when everything goes as expected. The real measure of a man, though, is your strength in face of obstacles. "Not that I speak in regard to need, for I have learned in whatever state I am, to be content: I know how to be abased, and I know how to abound. Everywhere and in all things I have learned both to be full and to be hungry, both to abound and to suffer need. I can do all things through Christ who strengthens me" (Philippians 4:11-13).
Trials such as the one you and your wife face are there as opportunities to grow. "My brethren, count it all joy when you fall into various trials, knowing that the testing of your faith produces patience. But let patience have its perfect work, that you may be perfect and complete, lacking nothing" (James 1:2-4). Without a doubt what you are facing is difficult. But difficult doesn't mean impossible. "No temptation has overtaken you except such as is common to man; but God is faithful, who will not allow you to be tempted beyond what you are able, but with the temptation will also make the way of escape, that you may be able to bear it" (I Corinthians 10:13). Often the trick is seeing the way out.
First, while our sex drive is strong, it doesn't mean it must dominate our lives. "But I discipline my body and bring it into subjection, lest, when I have preached to others, I myself should become disqualified" (I Corinthians 9:27). Like every other male, you did manage to live a number of years without intercourse. The average man becomes sexually capable around the age of 13, but the current average age to marry is around 27. Most men who strive to be faithful to God live without sexual intercourse for ten years. If you could do it then, when your sex drive was at its peak, can it not be done now? "For there are eunuchs who were born thus from their mother's womb, and there are eunuchs who were made eunuchs by men, and there are eunuchs who have made themselves eunuchs for the kingdom of heaven's sake. He who is able to accept it, let him accept it" (Matthew 19:12). Much of it depends on how badly you want to reach heaven.
While intercourse would be the ideal expression of sex, there are other forms. Talk it over with your wife. You didn't mention the nature of her illness, but is it possible for you and she to give pleasure to each other through those means?
Even if it is not possible, the male body will take care of itself through nocturnal emissions. While many men engage in impure thoughts to aid self-stimulation, which is wrong, the act of ejaculating by itself is just a function of the body. "A good man out of the good treasure of his heart brings forth good things, and an evil man out of the evil treasure brings forth evil things" (Mark 12:35). The Old Testament mentions it as something equivalent to a woman's monthly blood flow (Leviticus 15:16-18; 22:4; Deuteronomy 23:10-11; Exodus 19:15).
There is a strange passage in Ecclesiastes that I would like you to think about: "I have seen everything in my days of vanity: There is a just man who perishes in his righteousness, and there is a wicked man who prolongs life in his wickedness. Do not be overly righteous, nor be overly wise: Why should you destroy yourself? Do not be overly wicked, nor be foolish: Why should you die before your time? It is good that you grasp this, and also not remove your hand from the other; for he who fears God will escape them all" (Ecclesiastes 7:15-18). At first glance it appears that the writer is advocating doing some sinful things in your life, but notice the last phrase precludes this conclusion: "he who fears God will escape them all." A person who obeys God is better than an overly righteous man, an overly wise man, an overly wicked man, and an overly foolish man. It seems straightforward that being overly wicked or foolish is bad, but what about the other two? Some people are so caught up in trying to be perfectly right that they call more things "wrong" than God does. In other words, their definition of righteousness becomes their own terms and not God's. It is like the Pharisees who thought that eating without first washing your hands was a sin (Matthew 15:2-9). While it is a good idea, God never gave such a law. I've seen this happen with men who get it into their heads that emitting semen is somehow sinful or dirty. It was a point of uncleanness under the Old Law, but that law has passed away. But even then, uncleanness doesn't mean sinful. Pork was unclean to eat, but pork wasn't sinful, though eating pork (thus breaking God's law) was sinful. In the same way, there were laws dealing with the result of emitting semen, whether through sexual intercourse, nocturnal emissions, or other means. Breaking the rules for dealing with the result was sinful, but fact that it happens is not a sin. It only becomes a sin when sinful thoughts accompany the deed (Matthew 5:28). Don't make laws where God has not; you'll destroy yourself trying to obtain things that are not obtainable -- and all for nothing.