In the period from the late 18th century to his death in the 1840s, maharaja Ranjit Singh had managed to form a coherent state in the Punjab, formed from the various Sikh Fiefdoms. The empire was pretty anti-communal, based on a sense of meritocracy and had even launched a counter invasion into Afghanistan ( the traditional homeland of India's Muslim invaders).
However upon Singh's death, the empire collapsed.
If by some means, e.g. A stable succession, the empire survived, what would it have meant for the future of the British Raj and the subcontinent?
It didn't collapse immediately upon Mahajarah Ranjit Singh's death. There were at the time two major factions within the Punjab contending for power and influence: the Sikh Sindhanwalias and the Hindu Dogras, who would later become the royal family of the British princely state of Jammu and Kashmir. On the death of Ranjit Singh in 1839, Lahore became a center of conspiracies and intrigue, largely those of the future Raja Gulab Singh and his two brothers. They succeeded in removing Ranjit Singh's unpopular legitimate son, Maharajah Kharak Singh,from power within a few months, and slowly poisoning him to death in prison a few months later. He was replaced by his able but estranged son Kanwar (Crown Prince) Nau Nihal Singh, with Raja Dhian Singh (one of the three brothers) installed as prime minister.
However, in 1840, during the funeral procession of his father Maharaja Kharak Singh, Nau Nihal Singh died in extremely suspiscious circumstances; while returning from his father's cremation, together with Udham Singh (the eldest son of the future Raja Gulab Singh) an archway at the Lahore Fort gave way and collapsed on them. Udham Singh was killed immediately- but eyewitnesses described Nau Nihal Singh's initial injuries as being small blows to the head, which merely knocked him unconscious and hadn't even drawn blood. The unconscious prince was taken into the fort by the Prime Minister, Dhian Singh. Nobody else was allowed into the fort, not even his mother, who beat on the fort gates with her bare hands in a fever of anxiety. Later, when his mother and friends were allowed into the fort, Nau Nihal Singh was dead; his head had been smashed in, possibly with a rock.
His mother, Maharani Chand Kaur challenged Sher Singh, the eldest illegitimate son of Maharaja Ranjit Singh and the candidate supported by the Dogras, on the grounds that her step-daughter, Nau Nihal Singh's widow Sahib Kaur, was pregnant; and asserted that she should assume the regency on behalf of the unborn legal successor to her husband's throne. In July 1841, Princess Sahib Kaur delivered a stillborn son (with suspicions that she had been poisoned to induce a miscarriage). This ended whatever hopes Chand Kaur had of realizing her claims. But courtly intrigue had not ceased. Dhian Singh replaced the maidservants of the Dowager Maharani with hillwomen from Jammu and Kashmir, who were loyal to him. The newly installed maidservants tried to kill Maharani Chand Kaur by poisoning her food, and eventually succeeded in finishing her off on 11 June 1842, smashing her head with wooden pikes from the kitchen.
Thus, the Dogras' coup was complete- they succeeded in raising Sher Singh, the eldest illegitimate son of Ranjit Singh, to the throne in January 1841. The most prominent Sindhanwalias took refuge on British territory, but had many adherents among the Army of the Punjab. Maharajah Sher Singh was unable to meet the pay demands of the Army, although he reportedly lavished funds on a degenerate court. In September 1843 he was murdered by his cousin, an officer of the Army, Ajit Singh Sindhanwalia. The Dogras took their revenge on those responsible, and Jind Kaur, Ranjit Singh's youngest widow, became Regent for her infant son Duleep Singh. After the Vizier Hira Singh was killed, while attempting to flee the capital with loot from the Royal Treasury (Toshkana), by troops under Sham Singh Attariwala, Jind Kaur's brother Jawahar Singh became Vizier in December 1844. In 1845 he arranged the assassination of Peshaura Singh, who presented a threat to Duleep Singh. For this, he was called to account by the Army. Despite attempts to bribe the army he was butchered to death in September 1845 in the presence of Jind Kaur and Duleep Singh.
Jind Kaur publicly vowed revenge against her brother's murderers, she remained Regent. Lal Singh became Prime Minister, and Tej Singh became commander of the army. Sikh historians have stressed that both these men were prominent in the Dogra faction. Originally high-caste Hindus from the Jammu and Kashmir region, both had converted to Sikhism in 1818. As such, the Sikhs' military leaders had a vested interest in losing the 1st Anglo-Sikh War. The greatest weakness of the Sikh Army in the 1st Anglo-Sikh War was its leadership, as both Lal Singh's and Tej Singh's conduct was questionable, amounting almost to treachery. There's substantial evidence that Lal Singh in particular was corresponding with a British political officer and betraying state and military secrets throughout the war. Lal Singh's and Tej Singh's desertion of their armies and refusal to attack when opportunity offered seem inexplicable unless they intended to lose the war. And in the immediate aftermath of the conflict, thanks to the Sikh Empire losing the war, the Dogras emerged with the largest gain of all- Raja Gulab Singh purchased Kashmir from the East India Company with a payment of 7.5 million rupees (extracted directly from the Sikh Empire's own coffers), was granted the title Maharaja of Jammu and Kashmir, and his break-away kingdom was immediately granted full legitimacy and protectorate status as a Princely State of the British Raj.
So, for the WI scenario which requires the smallest divergence, WI the collapse of that gateway hadn't knocked Nau Nihal Singh unconscious? Or WI Nau Nihal Singh's son and rightful heir had been born alive and healthy, instead of being miscarried and stillborn? IMHO, if the Dogras had been foiled, and the Sindhanwalias had emerged dominant and victorious, then the empire could very well have stablised, with the establishment of a clear line of succession enabling the Sikh Empire to survive.
IMHO, you'd then probably have the Great Game develop into a proxy war. The Sindhanwalia faction had historically been firmly aligned with the British, giving the British free passage and logistical support in the First Anglo-Afghan War; and indeed, it was the cutting off of this logistical support and of their supply train via the Sikh Empire which led to the collapse of the British occupation and forced Elphinstones' retreat from Kabul IOTL. ITTL, a Sindhanwalia Sikh Empire would have likely become even more aligned with the British. Kanwar Nau Nihal Singh had offered direct military assistance to the British occupation forces during his brief tenure, but the British had rejected the offer, perceiving it (probably correctly) as an effort by the Sikh Empire to seize the spoils for itself.
After things go south for the British occupation though, in the immediate aftermath of the POD, the get-out-of-jail free card offered by the Sikhs' requests to join the occupation force in exchange for a share of the territorial gains, may seem a lot more attractive- and if the British do eventually take Nau Nihal Singh's offer ITTL, it would not only enable the British East India Company to save face, increase their influence in the region and achieve substantial profit from the war (probably through the revenue generated by the sale of some portions of occupied Afghanistan to the Sikhs, markedly increasing the size of Peshawar Province), but it would also cement the status of the Sikh Empire as a close ally of the British Raj, vaguely comparable to the Kingdom of Nepal.
With Afghanistan itself likely being conquered in its entirety ITTL over the course of subsequent campaigns, partitioned between the Sikh Empire, the British and perhaps even the Russians, the Sikh Empire could effectively fill the role that Afghanistan did IOTL far more effectively than the Afghans ever could or were ever willing to, serving as both a buffer state of the British against Russians' expansionism into Central Asia and as a critical ally of the British in the region ITTL. And if it manages to complete its unfinished business in the South, and the Sikhs manage to complete their conquest of Sindh (which had commenced 20 years earlier with the conquest of Multan Province from the Talpur Dynasty- as such, Sindh was technically still at war with the Sikh Empire, but merely lacked the stability and military strength to attempt to mount a counter-invasion to retake Multan Province), thereby gaining direct access to the sea and to international trade through its own ports, then the Sikh Empire could become independently powerful in its own right.
As such, later on, it could also potentially fill the role that Japan did in the Anglo-Japanese Alliance IOTL; even better than Japan did IOTL, given that both the total population and the GDP of the Sikh Empire in 1840 are estimated to have exceeded those of Japan at the time (albeit having a lower GDP/capita, but not by much). Joint co-operation between the Sikh Empire and the British Empire against the menace posed to both of them by Russian expansionism in Asia (as well as the clear menace posed to both of them by a restored revanchist Mughal Empire, if a similar uprising to OTL's Indian Rebellion of 1857 were still to happen ITTL) would have been well-established by this stage; the Sikhs attempted to invade and annex Tibet IOTL, and ITTL, they may well be doing so later on in the stead of the British with their blessing.
And unlike the Anglo-Japanese Alliance IOTL, which antagonized the USA and France, the Anglo-Sikh Alliance ITTL wouldn't really risk antagonizing anyone besides the Russians, which was and presumably still would be the Alliance's main intention. So, a formal Anglo-Sikh Alliance seems far less risky and far more expedient for both parties ITTL than the Anglo-Japanese Alliance of OTL. From then on, the butterfly effect means that it's anyone's guess how the world would turn out by the present day; but IMHO, TTL's Sikh Empire would be either just as likely or even more likely to become a world power as TTL's Japan; perhaps even more likely than OTL's Japan.