Waking up at night with very negative thoughts

I have noticed that I wake up at least once per night and my brain immediately offers a negative thought like “you shouldn’t have done that at work yesterday. You’re an idiot” or another one about missing family back east and moving away was a bad idea (I’ve been out here 13 years!) All thoughts are beating myself up about something and generate feelings of self-loathing, shame or sadness. It occurred to me today that these thoughts and feelings must be lurking underneath the surface all the time, especially in the evening before bed, when I do a ton of buffering with food or lately mostly scrolling my phone. Is there a practice I can do to start processing those thoughts and feelings in the evenings? I usually journal and download thoughts in the morning but then I’m usually in a much more positive space.