ALTAMONTE SPRINGS — The city has called a special meeting Thursday to debate and possibly break the deadlock on the method for divvying the local option gas tax, after two cities rejected the fourth formula presented this year.

The agreement requires approval by cities representing more than 50 percent of the county's incorporated population. On Monday, Sanford's commission approved the proposal while Casselberry rejected the measure.

Sanford joined Lake Mary, Oviedo and Winter Springs in approving the formula. The four cities make up 47.1 percent of the incorporated population. Casselberry rejected the formula in a 3 to 2 vote, siding with Longwood's reasoning that the annual changing share for cities would prevent them from using the funds to sell bonds and finance projects. The two cities have 27 percent of the population.

Altamonte Springs, with 25.9 percent of the county's incorporated population, is the only city that has not voted on the issue.

''It's a vicarious moment of pleasure to be in the catbird's seat,'' said Altamonte Springs City Manager Phil Penland, who added that it is highly likely the commission will approve the formula because it is consistent with what they have supported in the past.

If the measure passes Thursday it will release more than $5 million in gas tax revenues frozen since last year. The funds have been impounded since August 1985, when Altamonte Springs appealed Seminole County's decision to distribute the money without allowing for annual adjustments. The city took that appeal to the Florida Cabinet, which told the local governments to try to work it out themselves by Sept. 4. The city said it would withdraw its appeal if the formula is approved.

The fourth formula proposed this year calls for the county to receive 63.6 percent of the money based on a fixed five-year history of transportation spending. Each city's share would be adjusted every year, starting January 1988, and would be based on each city's proportion of transportation spending for the most recent five years.

The county drew up the latest formula after its financial advisers opposed an agreement in which the county's share would have floated. The county said it needed the fixed formula to finance detailed road planning and construction and that the rolling formula encourages cities, which do not have major road repair bills, to spend more on transportation.

The Altamonte Springs city commission will meet at 5:30 p.m. Thursday at city hall, 205 Newburyport Ave.