In my opinion, the people who can't adapt are the people who just give up.
But then I'm a stubborn asshole (or so I'm told at times) and I was determined that I would not just give in to living with a problem that was going to get worse and worse the older I got, not with a family history of massive strokes and heart disease on my mother's side.
As a short-term self-help measure, I would recommend that you keep track of the good nights and the good days for now. Think of every good night and every good day as both a blessing and a sign of progress. Don't bother tracking the bad nights and the bad days, just the good ones. With the short term hope of having at least one or two good nights/days each week for the next couple of months while you continue working with your doctors on all of your problems. And don't beat yourself up when you have a bunch of bad days/nights in a row; just accept it as part of the process for learning how to sleep well with a six foot hose attached to your face. When you find yourself ruminating on how bad your sleep seems, focus on remembering the last good night even if it was a while back.
I've also taken the time to go back and re-read this whole (19 page) thread. You also are dealing with significant depression issues and issues connected to medication needed to control the depression as well as issues tied to the necessary change in your medication. And you've been dealing with a significant spike in anxiety related to worrying about the quality of your sleep. You've also tried sleeping medication, but it's not clear what sleeping pill(s) have been prescribed and how you have been taking the sleeping pills, but you have complained that they "stopped working" after a few days at least once.
In other words, you are dealing with a thicket of interrelated problems:
- Insomnia issues that seem to have exploded when you started PAPing, but you also have had some reasonably decent nights with good sleep and you've said that it's now hard to try to sleep without the machine. (That indicates that some part of your body & brain does NOT want to go back to sleep that is interrupted every few minutes by very real mini-suffocations.)
- Depression, which can adversely affect sleep quality. And bad sleep which can increase the depression.
- Medication for treating depression, which lead to daytime fatigue and brain fog as well as insomnia; but not taking the medication makes your depression much worse. And so you're also dealing with the need to find a balance between the improved mood and making sure the side effects are tolerable enough to live with.
- The anxiety reflected in the time you spend worrying about the quality of your sleep makes it harder to "fix" the sleep, but the bad sleep makes it harder not to worry. And the fact that you've had to deal with a necessary change in the depression meds while also dealing with starting CPAP just adds to the anxiety issues.
Make sure you know the sleep doc knows exactly what anti-depressant you are taking and what the dosage is. Make sure the psychiatrist knows that you've been recently diagnosed with sleep apnea and that you have started CPAP therapy and that you've been switched to bilevel because of adjustment problems. Make sure both docs know what sleeping pills have been prescribed, the dosage, and the instructions on how to take them. Make sure both doctors send reports to the other doctor as well as your primary care physician. Tell both doctors you are concerned about the fact that you don't seem to be sleeping much and that the depression/daytime functioning is not what it should be. In other words, be honest about how hopeless you feel about your sleep and overall quality of life right now. And then listen---really listen---to anything they say about how to break out of the feedback loop that you are trapped in.
You also need to verify with the doc that prescribed the sleeping pill the instructions for using it---how often should you take it (every night or only "as needed") and when you should take it with respect to bedtime. If it has really become ineffective for multiple nights (not just one bad one), that needs to be reported as well.
And finally I think you do need a referral to a therapist who can do some CBT for the insomnia, but maybe also for some anxiety issues as well. It's important to understand that CBT is not a replacement for needed drug therapy. Rather think of it as a tool that can be used to increase the effectiveness of the drug therapy. Your insomnia may need both sleeping pills and CBT-I to get your sleep to improve to where you are not feeling crappy all the time. Likewise, if you can learn to control certain behaviors that feed the anxiety that may also help.