Yeah, I think you're being too hard on yourself. It's okay to plan for some treats so long as they don't use up a huge portion of your calories on a regular basis. You don't want to eat 500 calories of sweets every day because then you won't be eating enough nutritious food (or you'll be over your calorie limit all the time), but a 60-calorie pudding cup is fine. For a long time, I worked a 200-calorie energy bar (which is basically like a candy bar) into my afternoon snacks. It helped satisfy my cravings for sweets, which kept me on track. Eventually I got to the point where I didn't need it any more so I've stopped eating the bars, but when I first started, those bars were a life-saver. Maybe I'll eventually give up the pudding cups too, but right now I really look forward to them.
I think you'll find that almost all the successful dieters on this forum allow themselves some type of low-calorie treat fairly regularly. For me it is the pudding cups, for others it is low-calorie ice cream snacks, for others it is a small piece of dark chocolate. Whatever you can have in the house that you won't overindulge on.
The idea of not eating after a certain hour is because people tend to overindulge when they do and tend to eat very high calorie foods during that time. Obviously, if you have already eaten all your calories for the day and then you have a big bowl of ice cream before going to bed, that's going to interfere with your weight loss.

But if you planned out your calories for the day, left a certain amount to be eaten between 7 PM and when you go to bed, and have a moderate (everything in moderation

) snack during that time, that's fine. It's all about calories in vs. calories out. So long as you burn more calories than you consume, you are going to lose weight. It doesn't matter when those calories are consumed.