I would say that it’s a matter of priorities; eating ‘unhealthy’ (read: palatable, easily digestible) food is totally fine, especially when under stress and at risk of not eating enough. The goal is to become neutral toward food rather than labeling it ‘good’ or ‘bad,’ so that you can follow your intuition and body’s day to day preferences to provide for yourself.
In your position, I would just worry about addressing that stress so that your appetite remains good and strong, rather than beating yourself up for not getting enough veggies in or something. You can also try making palatable home-cooked foods if your concern is more with the additives in ‘junk’ food. Homemade desserts, hearty food like mac and cheese and mashed potatoes, can all be highly palatable while still being somewhat nutrient dense.