Two things
@JohnK - they are right about the CPAP - if you are significantly overweight and especially if you prefer to sleep on your back, you will likely be suffering sleep apnoea. And it causes you to secrete cortisol, a stress hormone which will try its best to defeat any attempt you make to lose weight by changing your body chemistry to encourage it to lay down fat. And sleep apnoea will also make you cranky and miserable in other ways.
Second, and this is the depressing bit, latest research tells us that once you have gained weight, your body's idea of its default weight will reset and it will always try to get you back to that weight by secreting hormones that make you feel hungry. So the depressing bit is (and I'm facing up to this myself at the moment), that if you want to lose weight and actually keep it off, you are going to have to resign yourself to being hungry (as
@Pushka above mentions) at least some of the time. It's not cool or fun, I know. There's research being done to try to counteract this, but in the meantime you should know that even a little weight loss, even if you regain it, does bring health benefits, so there's that upside. And the second good news is that self-control is like a muscle, if you exercise it, it gets stronger, so even one act of resisting that hunger after you've eaten will make it easier the next time to resist the urge to eat more. And so on.
I don't know if any of this information will help you, I know it's disheartening to keep dieting and regaining.