Clean any grease or dirt from metal
If it is very slick, consider sanding it to create some key for the primer
Prime with Zinsser Cover stain oil based primer or rustoleum oil primer
Finish with rustoleum or industrial oil in a dark color or use a water based product if you like. Make sure the rustoleum primer states that it can be top coated with water. Most primers can be top coated with anything commonly used for industrial or home use.
That beam should hold up great since it is indoors and likely won't be touched by anything other than the trolley.
The gate to my back yard is about 30" wide and weighs 1,000+ pounds (more when wet) and rides on 1" steel angle that sits with the point up. I sprayed it with a galvanized coating from a spray can. It has held up very well to the SoCal weather and surprisingly, where the roller rub on the steel, it has not rusted. I don't know if it was the coating that protected it, or if it is polished from the wheels rolling over it, but I expected that small contact area to rust over time.
I was a pro painter for 17+ years and have seen more steel posts, steel fences, and doors than I care to think about. Steel is very stable compared to wood. Failure in the paint would be from bad prep, rough handling, or getting wet often. I don't think any of those things will happen to your project. A dark color should show dirt less than a very light one. You could even top coat that beam with whatever finish you use on the ceiling, after proper prep and primer.
Paint is mostly about prep, and also attention to detail as you apply it.
Foam anything.........*****, based on trying to use those products in the past. I got a lot of air bubble from foam and it just doesn't leave the same finish as a traditional roller cover.
I like 1/4" nap roller covers for painting steel like that and nylon polyester blend brushes (made for all paints) work fine for oil. A cheap brush would be ok if you are just doing anything the roller won't get, as longs as it doesn't shed.