The Lions had the better of the match but failed to score despite a number of decent chances, and were made to pay for that in the 88th minute when Ed Upson struck a late winner for the Glovers.
"It's very hard to take but we've only ourselves to blame," Lomas told reporters. "We had five decent chances and you have to take them.
"A shot from the edge of the box, unopposed, isn't good enough. When you don't take your chances, it can come back and haunt you."
Millwall travel to AFC Wimbledon in the Capital One Cup next Tuesday before facing Ipswich Town on Saturday, August 10.