Here's my attempt at translating it:
In riding the limited Express train that passes through the line I've been using, you need to pay an extra charge of 500 yen. It's a bit expensive but, on days when it's too hot for me or when I'm too tired from overworking, I would just ride it thinking that I had drunk a cup of coffee instead.
What is the correlation of 'drank a cup of coffee' and 'riding the train during hot days or exhaustion from work'? Is it because rather than a regular train, this particular one can help him arrive home faster?
Did the writer imply that riding the train re energizes his body and it's like paying for a coffee? This usage of つもり seemed a bit different than
These sound more like "doing ... With the belief of ...."
While the above has a nuance of replacement "doing .... As if you are doing ... Instead"