Boromir was not evil. He simply didn't have enough Faith.
Keep in mind that Sauron could not be defeated by all the military strength of the West, and everyone knew it.
‘Pride and despair!’ he cried. ‘Didst thou think that the eyes of the White Tower were blind? Nay, I have seen more than thou knowest, Grey Fool. For thy hope is but ignorance. Go then and labour in healing! Go forth and fight! Vanity. For a little space you may triumph on the field, for a day. But against the Power that now arises there is no victory. To this City only the first finger of its hand has yet been stretched. All the East is moving.
(LotR, The Pyre of Denethor)
Denethor was driven to suicidal despair, but he was not wrong in his assessment.
‘My lords,’ said Gandalf, ‘listen to the words of the Steward of Gondor before he died: You may triumph on the fields of the Pelennor for a day, but against the Power that has now arisen there is no victory. I do not bid you despair, as he did, but to ponder the truth in these words.
‘The Stones of Seeing do not lie, and not even the Lord of Barad-dûr can make them do so. He can, maybe, by his will choose what things shall be seen by weaker minds, or cause them to mistake the meaning of what they see. Nonetheless it cannot be doubted that when Denethor saw great forces arrayed against him in Mordor, and more still being gathered, he saw that which truly is.
‘Hardly has our strength sufficed to beat off the first great assault. The next will be greater. This war then is without final hope, as Denethor perceived. Victory cannot be achieved by arms, whether you sit here to endure siege after siege, or march out to be overwhelmed beyond the River. You have only a choice of evils; and prudence would counsel you to strengthen such strong places as you have, and there await the onset; for so shall the time before your end be made a little longer.’
(LotR, The Last Debate)
We don't know how much Denethor told Boromir, but it seems pretty likely that Boromir had a good understanding of their strategic situation before he left for Rivendell: he too knew that the war was without final hope. He was Denethor's son, he had fought for Minas Tirith against Sauron many times, and he wasn't a fool. Boromir knew that all the West could not endure against Sauron - and consider how close even Sauron's first assault was: ruin amongst the Elves, Pelennor won by a lot of luck at the last minute, and Dale and the Iron Mountain didn't fare so well, either.
So: imagine that you and everyone you know are going to die as slaves under the Dark Lord. What are you going to do? The solution of the Wise is, since you happen to have your hands on a potentially war-winning superweapon, send it deep into enemy territory in the hands of two country-bumpkin Hobbits and hope they manage to infiltrate the Enemy's country and his personal forge so they can toss said superweapon in. By the way, if the Enemy gets his hand on this superweapon, he wins the war even more quickly and you don't even have the hope of enduring his assaults for a little while.
You can see why some people might have a problem with that plan.
‘What then is your wisdom?’ said Gandalf.
‘Enough to perceive that there are two follies to avoid. To use this thing is perilous. At this hour, to send it in the hands of a witless halfling into the land of the Enemy himself, as you have done, and this son of mine, that is madness.’
‘And the Lord Denethor what would he have done?’
‘Neither. But most surely not for any argument would he have set this thing at a hazard beyond all but a fool's hope, risking our utter ruin, if the Enemy should recover what he lost. Nay, it should have been kept, hidden, hidden dark and deep. Not used, I say, unless at the uttermost end of need, but set beyond his grasp, save by a victory so final that what then befell would not trouble us, being dead.’
(LotR, The Siege of Gondor)
Thus we return once more to the destroying of the Ring,’ said Erestor, ‘and yet we come no nearer. What strength have we for the finding of the Fire in which it was made? That is the path of despair. Of folly I would say, if the long wisdom of Elrond did not forbid me.’
(LotR, The Council of Elrond)
Here's the thing - the Plan was never a rational plan. It was almost explicitly an irrational plan.
Despair, or folly?’ said Gandalf. ‘It is not despair, for despair is only for those who see the end beyond all doubt We do not. It is wisdom to recognize necessity, when all other courses have been weighed, though as folly it may appear to those who cling to false hope. Well, let folly be our cloak, a veil before the eyes of the Enemy! For he is very wise, and weighs all things to a nicety in the scales of his malice. But the only measure that he knows is desire, desire for power; and so he judges all hearts. Into his heart the thought will not enter that any will refuse it, that having the Ring we may seek to destroy it. If we seek this, we shall put him out of reckoning.’ (LotR, the Council of Elrond)
It was a plan (mostly Gandalf's, it seemed) predicated on faith that everything was just going to work out according to Eru's will, and he has everyone's best interest in mind.
For in his condition it was for him a sacrifice to perish on the Bridge in defence of his companions, less perhaps than for a mortal Man or Hobbit, since he had a far greater inner power than they; but also more, since it was a humbling and abnegation of himself in conformity to ‘the Rules': for all he could know at that moment he was the only person who could direct the resistance to Sauron successfully, and all his mission was vain. He was handing over to the Authority that ordained the Rules, and giving up personal hope of success. (Letters)
So this was Gandalf's attitude in general: do what is Right, in accordance with the Rules, and let it all work out as it does. As Gandalf says to Denethor, he has to think of the quickest and most permanent route of the Enemy's defeat; a way that does not run the risk of creating new tyrants. Destroying the Ring is therefore the Right measure. But it still is a crazy plan.
You can see more hints of this in Tolkien's Letters, which talk a lot about providence.
I do not think that Frodo's was a moral failure. At the last moment the pressure of the Ring would reach its maximum - impossible, I should have said, for any one to resist, certainly after long possession, months of increasing torment, and when starved and exhausted. Frodo had done what he could and spent himself completely (as an instrument of Providence) and had produced a situation in which the object of his quest could be achieved. His humility (with which he began) and his sufferings were justly rewarded by the highest honour; and his exercise of patience and mercy towards Gollum gained him Mercy: his failure was redressed. (Letters)
But at this point the ‘salvation’ of the world and Frodo's own ‘salvation’ is achieved by his previous pity and forgiveness of injury. At any point any prudent person would have told Frodo that Gollum would certainly* betray him, and could rob him in the end. To ‘pity’ him, to forbear to kill him, was a piece of folly, or a mystical belief in the ultimate value-in-itself of pity and generosity even if disastrous in the world of time. He did rob him and injure him in the end — but by a ‘grace’, that last betrayal was at a precise juncture when the final evil deed was the most beneficial thing any one cd. have done for Frodo! [...]
[Later, in the same letter] But the One retains all ultimate authority, and (or so it seems as viewed in serial time) reserves the right to intrude the finger of God into the story: that is to produce realities which could not be deduced even from a complete knowledge of the previous past, but which being real become part of the effective past for all subsequent time (a possible definition of a ‘miracle’). (Letters)
So you can see why Boromir would have had doubts all along, especially as he was sent there by this father.
What in truth this Thing is I cannot yet guess; but some heirloom of power and peril it must be. A fell weapon, perchance, devised by the Dark Lord. If it were a thing that gave advantage in battle, I can well believe that Boromir, the proud and fearless, often rash, ever anxious for the victory of Minas Tirith (and his own glory therein), might desire such a thing and be allured by it. Alas that ever he went on that errand! I should have been chosen by my father and the elders, but he put himself forward, as being the older and the hardier (both true), and he would not be stayed. (LotR, The Window on the West)
This is certainly echoed in Boromir's words to Frodo, even when he is 'possessed' by his desire for the Ring.
As you wish. I care not,’ said Boromir. ‘Yet may I not even speak of it? For you seem ever to think only of its power in the hands of the Enemy: of its evil uses not of its good. The world is changing, you say. Minas Tirith will fall, if the Ring lasts. But why? Certainly, if the Ring were with the Enemy. But why, if it were with us?’
‘Were you not at the Council?’ answered Frodo. ‘Because we cannot use it, and what is done with it turns to evil.’
Boromir got up and walked about impatiently. ‘So you go on,’ he cried. ‘Gandalf, Elrond - all these folk have taught you to say so. For themselves they may be right. These elves and half-elves and wizards, they would come to grief perhaps. Yet often I doubt if they are wise and not merely timid. But each to his own kind. True-hearted Men, they will not be corrupted. We of Minas Tirith have been staunch through long years of trial. We do not desire the power of wizard-lords, only strength to defend ourselves, strength in a just cause. And behold! in our need chance brings to light the Ring of Power. It is a gift, I say; a gift to the foes of Mordor. It is mad not to use it, to use the power of the Enemy against him. The fearless, the ruthless, these alone will achieve victory. What could not a warrior do in this hour, a great leader? What could not Aragorn do? Or if he refuses, why not Boromir? The Ring would give me power of Command. How I would drive the hosts of Mordor, and all men would flock to my banner!’ [...] 'I do not say destroy it. That might be well, if reason could show any hope of doing so. It does not. The only plan that is proposed to us is that a halfling should walk blindly into Mordor and offer the Enemy every chance of recapturing it for himself. Folly!
(The Breaking of the Fellowship)
But Boromir did recognize his error at the end:
At last slow words came. ‘I tried to take the Ring from Frodo,’ he said. ‘I am sorry. I have paid.’ His glance strayed to his fallen enemies; twenty at least lay there. (The Departure of Boromir)
But that's all it was: an error. He was, naturally, tempted more than the others - a leader of the most powerful realm that directly resisted Sauron. He succumbed and repented.