I got in a car crash (someone crossed the freeway without looking while I was on it) this spring with my MTB hanging on a frame rack on the back of my car. The bike (2016 Rocky Mountain Altitude 730 alu.) swung forward, hitting the rack, leaving a big dent in the down tube. The down tube largely sees tensile forces, so it'd be hard to believe that it is highly prone to failure. How safe is it to ride for another year or two? Any mechanical engineers in here? Anyone with similar experience?
Have insurance buy a replacement bike. The bike might be ok but is that ok. The bike does have a point of potential failure or weakness. You don't want to end up on a friday fails video...
An engineer will want to perform a NDT on the frame not give you an answer on the net.
Years from now you how want to answer the question of "why do walk with that limp?"
"I was riding this dented bike and it failed, causing me to crash and break myself..."
Or
"I sent this gap, cased the landing and broke myself"
You're right, just riding along with your weight normally pushing down through the pedals/BB, the downtube is in tension - the dent wouldn't be a problem. However, if you were to run straight into something with your weight still through the BB, that puts the downtube in compression, where that dent creates a point of failure.
Given that the dent is on the side and not the bottom, I'd personally be fine riding it temporarily until a new bike arrives. I wouldn't ride this permanently though, as it does look like the dent start to wrap around the bottom.