This sort of thing happened to me last week. I was drafting a bus and it was raining outside and I forgot to tighten up my brake cable like I was supposed to do weeks ago. So the bus stopped and I couldn't. I locked my legs to skid and hit my front brake, but it was too late and I ran right into the back of the bus.
My front wheel hit first, then my head sort of headbutted the back immediately after. I was fine, but kind of dizzy and really embarrassed because some people on the sidewalk saw it happen. But I rode off and the whole way home I was thinking, "did my front wheel get shorter?" I made it home, but I noticed that I had bent the fork to where it had maybe 1 cm space between it and the downtube.
I was told by most bike shops that I went to that they wouldn't repair the fork because it is a liability for them and mine looked about like yours but lucky for me, my frame and everything else seems alright. At least it was only my winter bike. It is a Schwinn Continental and it is heavy as hell, but it can take a beating for sure. I don't know if I even could dent the frame.
I also don't think I would ride that frame it dented like that. Even if it doesn't randomly collapse on you while riding, if you get into another accident on that bike, then I would definitely expect the frame to break or fold in at the dent.