An intense struggle is developing out of public view between two senators with diametrically opposed views who want to succeed the late Lee Metcalf (D-Mont.) on the Senate Energy Committee.

The contestants are two freshman Democrats, Wendell R. Anderson (Minn.) and John Melcher (Mont.). Anderson is an outspoken opponent of the oil and gas industries - "he hates our industry with a passion," according to one oil company representative - whereas Melcher has consistently sided with oil and gas interest on key Senate votes.

The outcome of the contest could prove significant, since the Energy Committee is now so closely divided on key issues. The best example has been its members' 9-to-9 division over deregulating natural gas prices, a split that has contributed to the delay in the House-Senate conference in agreeing on President Carter's energy program.

Metcalf voted against deregulation of natural gas. His death on Jan. 12 left the committee divided 9-to-8 in favor of deregulation.

All members of the committee have been serving as conferees with the House on the natural gas issue.

Anderson, aides say, would like to succeed Metcalf in the conference, to maintain the strength of anti-deregulators there. But Sen. Henry M. Jackson (D-Wash.) is said to feel that the question of Metcalf's successor on the Energy Committee should be separated from the question of his successor in the conference.

The full Senate would have to approve whomever Energy Chairman Jackson chooses to add to the conference committee, and that could lead to a floor fight if he picked a senator strongly identified with pro or anti-deregulation forces. Jackson is looking for a compromise figure who is not so identified with either side.

Another possibility is that no new conferee will be named to take Metcalfs' place. This would avoid a floor fight, and the 9-8 split in favor of deregulation would accurately reflect the full Senate's 50-45 vote last year to deregulate the price of so-called "new" natural gas.

The vacancy on the Energy Committee will be filled by the Democratic Steering Committee. Majority Leader Robert C. Byrd (WVa.) said yesterday the committee won't meet until Montana and Minnesota have sent new senators to Washington to fill the seats of Metcalf and Hubert H. Humphrey, who died last week. Replacements may be appointed in both states next week.

The senators on the steering committee voted 2-1 against deregulation of gas on the floor last year. However, this preference may not determine their vote in the Anderson-Melcher contest, because at least some steering committee members - apparently including Byrd - believe that Melcher has their commitment to Metcalf's committee seat.

Melcher sought a place on the Energy Committee last January but was turned down, largely on grounds that two senators from the same state and party should not serve on the same committee, and Metcalf already had a place. At this time, according to members of the steering committee, Byrd proposed that Melcher be promised Metcalf's already-announced retirement.

Melcher now seeks to redeem that pledge, and Byrd is apparently backing him. Melcher is known to believe he has the necessary votes in the steering committee.

Anderson and his supporters dispute this, however, Anderson acknowledged yesterday that he was "a long shot," and said he had entered the picture only last weekend but still thought he had a chance.

An aide to Sen. Howard M. Metzenbaum (D-Ohio), who is backing Anderson, called the vote "vote close, touch-and-go."

The oil and gas industries favor Melcher. The Washington office of the Sierra Club, a conservation group, has made telephone calls on Anderson's behalf.

Anderson apparently has Jackson's support. Anderson said yesterday that Jackson asked him earlier this month to consider making a run for the vacancy. A source close to Jackson said he was anxious to maintainthe ideological balance on his Energy Committee.