I did the same. I am surrounded with carbs, my SO cook carby food, even I cook and bake for him… I shouldn’t consider food that isn’t right for me food at all. It’s not always as easy, it was super easy to stop eating grains, dry legumes, sugar, potatoes (my big old fav item) for years… But some desires came back (potatoes! and I bake great bread too. it’s not a normal food for me at all but nice and exists!)… Fortunately as the years pass, my new habits get stronger.
Sometimes I have a wilder day. But I can stop them. I can’t even continue them as my body loves what I do on my good days.
Actually, making my woe stricter helped me… I’ve read some people raises carbs after some time, well I lowered them drastically and it helps with the part where I want or just eat things I really shouldn’t, what a silly thing but may happen.
If I get full with fatty meat and don’t even start to eat much carbs (like a bunch of berries as it’s a common thing ketoers eat. or nuts), it’s not that hard to stay on track for a while…
But probably most of all need the right level of strictness. Not too strict, not too lax. I surely do!
If it’s boring, I get creative and I do experiments too! Food never will be mere fuel for me
But it doesn’t mean I must eat much carbs.
But when it’s really boring, I still depend on my treats. But they aren’t junk, they are proper things just dessert type (or not but usually) 
It’s not good to eat without any need but if it’s done with the right items, they probably can’t be that bad… It depends. I can’t overeat from eggs and meat, less meals may help too… So a tiny dairy here and then is fine. My desserts are very heavily egg based and they usually contain a little dairy, it makes it different and more exciting.
But my plan A is big variety, desserts may or may not be a slippery slope - they are usually fine now but I still don’t find it mentally healthy to eat sweets all the time. For me. My SO half-lives on sweets, it works for him. But it’s not for me.
I am on low-carb since… more a decade? I had my phases and everything. It takes time to find our sweet spot, for some it takes a very long time.
I would think a bunch, that is important too - but probably would try to find dishes I am happy with and don’t need something worse. Amounts matter too but if you can’t stop below a tub of ice cream, maybe you aren’t like that… Or the tube is tiny for that kind of ice cream, it’s possible. I only can eat little from very dense or rich treats or it was in the past, now I am good with tiny amounts - as long as my normal food is much enough. But it’s known most people have items they can eat a ton of. It is (was?) carbs for me and added fat and cream… So I avoid them, mostly. A tiny bit is mostly harmless and I trained to be able to eat a tiny bit only. If you know you are hopeless with something and loses control, don’t eat it.
Being nicely full with the right food makes wonders in the case of many of us! Not all “keto food” is good for that. I only have this stop sign with fatty meat. And even desserts can tempt me (much), I just can’t fit more food. And I always had a very impressive separate dessert stomach.
So maybe food choices can help even with the desires. Maybe it’s purely mental, I mean, food choices don’t help. I still need to train myself but without the right keto style, I couldn’t do it right.
And sometimes we need our keto to change, evolve with us…
Hopefully I wrote something that helps or make you think or something?