You are very confused. I'm not saying those things aren't true. I'm saying they are just unhelpful. I'm not saying to delude yourself by saying "Actually, I am in shape", "I will never embarrass myself at the gym" or "I'll be able to keep this up forever". I'm saying, think more productive thoughts that will get you closer to your goal. For example, you say to yourself "I'm so out of shape. I hate how I look". What you want to do is catch yourself and ask "How are these thoughts helping me get in better shape?". They aren't. They are only hurting you. Going to the gym and working out is what will get you in shape, regardless of whether your thoughts are positive or negative. But thinking negatively all the time will sap your motivation and enjoyment of life.

Edit: I also want to acknowledge this:

If it’s a choice between being miserable and acknowledging the truth, or being happy in a delusion of your own making

There are clearly other choices here that you are missing:

- Think about something else that is not going to make you feel miserable. Take your dog for a walk, listen to some music you like, meditate. Relax, enjoy life.

- Reframe your negative thoughts. For example, if I think "I'm going to embarrass myself at the gym, I might as well not go". A way to reframe this is "so what if I embarrass myself at the gym? I'm not an expert at lifting weights and working out and that is plainly clear by me being out of shape. If someone else doesn't like what I'm doing or the way I look, that is their problem. I'm trying to do something good for myself here and I'm not going to let other people get in my way".

- Stop thinking your negative thought and make an action plan to fix it. For example "I'm so fat and out of shape". This will make you feel shitty for a brief period of time, but writing down a real plan that you can do to resolve the problem will make you feel better. The plan has to be doable. A lot of people make huge plans that are very difficult to execute. To make a doable plan to resolve a problem, you first may need to break the problem down in to smaller chunks. Also, it is important to remember that it doesn't matter if someone else was able to accomplish the same thing you're trying to do with less effort. The only thing that should matter to you is getting the results you want.

- Tell yourself to worry about the problem later. Again, "I'm going to embarrass myself at the gym". Is this really a problem for you right now if you're not planning to go to the gym until tomorrow? It is not a problem for right now. Shelf it for later and do something right now that can make your life better.

- Question your thought. Back to embarrassing yourself at the gym. You're making an assumption that the fit people at the gym are going to see an overweight person doing something incorrect and they will ridicule you for it. In reality, it is very likely that some of those people in the gym were once in your shoes, overweight and down on themselves and lost as to what to do. It is perhaps equally likely that someone will see your efforts and come over and offer you encouragement and advice. You may even make some friends.

- One last thing can just be to accept the thought as reality and move on. The thought: "I won't be able to keep this up forever". Well, that is probably true, but does that mean you shouldn't try? Do you respect people who quit before they've even started? Your own internal response to this should be "I can't keep it up forever, but I can try my best because that is the type of person I want to be" and leave it at that. And you may even be wrong. Maybe you can keep going to the gym until you're 80. Or another thing to ask is if this thought even matters? Your goal is just to get in shape in the near future, not have a six pack in your 80s.