Start by not panicking. Take a deep breath and say hello to the new you with a new focus and direction. Be kind to yourself and look forward to the coming successes.
As I often say when in a mess, "the only way is UP" so it can be good news from here on in.
Take each day one at a time.
Have a few goals like, reducing carbs to xxx or by yyy, or planning todays meals
Cut out any sweets, sugar.
Reduce bread, potatoes, rice, cakes, etc
Carbs are bad news for type 2s so plan your days meals with that in mind
But it is very difficult to do any of it blind, so, get a food book or use the internet and write down the carb content of your days meals. See if there are any carb heavy items and try to reduce those.
Many find it useful to get a blood glucose meter and to test before and 2 Hrs after a meal to see if that meal is fine or creates a spike in your blood glucose levels. If a particular meal creates a spike either reduce that meal in future or the carb heavy part or avoid it going forwards.
Keep a food diary so that you know what you have been eating and can refer back to good meals in the future.
Don't punish yourself. Seriously. It is a reaction we all can have. Something goes wrong, say, you eat too much of something you know you shouldn't and then feel guilty and then punish yourself perhaps by eating more....just tell yourself that you are human and a liitle frail and perhaps afraid and you will try harder not to do zzz going forwards.
And remember this is a life long change of lifestyle. So consider what you can do, what you might eat for the longer term. I made a big list of foods that I like and can eat and a list of foods that I like but must try to avoid. The lists helped a lot.
Celebrate each day your successes. Even things like keeping your carb count down, losing a tiny amount of weight (if that is what you are doing), keeping to your planned meals, etc etc.
Talk to the people here on the forum to see what they do, what works for them, what trials they have been through. Research as much as you can to discover your condition and what you might be able to do to help yourself. One of the things I like on this forum is that they understand when we feel down, lost or rant. And their advice is good too.
And finally believe in yourself. Take it all one step at a time. There's a lot to get your head round and it does take time to get things sorted out.
Good luck and let us know how your are getting on.