Here's an experiment you can try that we used to do in high school
Get an empty coke can with no dents or other disfigurements in it, place it upright on the ground, and stand on top of it. It should be able to bear the weight of most adults with normal body mass.
Now put a small dent in the can and try it again. But be careful because the small dent will introduce a weakness into the can and it will almost certainly buckle under your weight this time.
Obviously a bicycle frame is made from much thicker gauge aluminium than a coke can, but the same basic principles hold. A tube is an inherently strong structure, but only if it remains true. You put a dent into it, you put a region into the structure where stresses will concentrate and try to deform the tube further. In the short term, it should be fine, but I suspect the lifespan of the tube would now be measured in months rather than years, as aluminium is a softer metal than steel and is more prone to metal fatigue (alumimium always suffers from stresses that will begin fatigue damage no matter how small the load, according to wikipedia). You also have to consider that there may be other items of less obvious damage, such as small cracks opening up in welds that are small enough to remain hidden by the paint. Fatigue will set in at these points as well.
If you do keep riding on this frame then I'd suggest monitoring the crash damage region very closely. Also, don't go mountain biking on a frame in that state! Stick to the roads. And stick to quiet roads where you're unlikely to hit anything else and ones with no potholes, because another big impact or bump could make the frame fold up like a book at the dent.
As for repair, I suspect the only realistic option is to completely replace that tube. Given how difficult aluminium is to weld I expect the cost of doing that would approach the cost of an entire new frame anyway, and given the frame already has some miles on it and will have accumulated some wear and tear it will not have the life expectancy of a new frame.
I think realistically, your only option is to put that frame out to pasture.